26 Jun 2017

Improve SQL server query performance on table with millions of records.

Improve SQL server query performance on table with millions of records.


Guest post : 

Hi I have a table with 1+ Million records. The Query Is very slow when I use a where.
For Paging I am using ROW_NUMBER() OVER (ORDER BY CreatedOn DESC) AS ROW_NUM
Can some one help me with best practices while creating table also best way to create ROW_NUM for Paging.

Solution :

Indexing the table is a good option.

If your table is not dyamic load table using Ajax in jquery datatable. It can handle rows efficiently.

Use a parameterized store procedure in parameter take the number of record and last starting that will optimize your code.

Users please post your solution too.

No comments:

Post a Comment