0

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?

Atul Yadav
  • 496
  • 7
  • 26
  • 1
    The equivalent to `limit` would be `top` in SQL Server –  Apr 18 '14 at 10:37
  • Since its 2012 you can use offset fetch method for pagination – Biju jose Apr 18 '14 at 12:02
  • See [this question](http://dba.stackexchange.com/q/63332/2718) which I answered yesterday. – Jon Seigel Apr 18 '14 at 16:27
  • Are you saying that you have no starting point to implement paging in SQL Server?? This is 1000x duplicate. – usr May 01 '14 at 12:48
  • possible duplicate of [Paging SQL Server 2005 Results](http://stackoverflow.com/questions/2840/paging-sql-server-2005-results) – usr May 01 '14 at 12:48

0 Answers0