Paged query service operation

I have a question about paged query,

Im use this tutorial (works fine, but today the user report me, slow the app)

Im check and the tables around 1000 records and in the live bindings is very slow

Im think pass parameter (from & to) in the function, but i ask you if have best practices, samples or forum link.

If you use Aurelius automatic CRUD endpoints, or service operations using XData query filters, paging is done automatically for you.

Since you are using raw SQL directly, then you have to retrieve the paged result yourself. Yes, easiest and more straightforward way is that you just receive the page values as parameters of your service operation and then build your SQL accordingly to retrieve the proper page.