I am facing problem to implement the pagination on grid. Actually after applying all the filter we get 3000k records from database but if pull the 3000k data the query take time so I am showing only top 300 record.
The user will never see all rows. But previously we were using MySQL and there we implemented the pagination where using the limit functionality we only pull 0-100 or 100-200 or 200-300, 2900-3000 rows. So we never faced this issue.
So we decided to implement the same in SQL Server but when we use rownum
to achieve the limit functionality then we again facing performance issue because query is taking long time.
Is there any way to achieve pagination functionality like MySQL?