Counter of Festivals

Ashok Blog for SQL Learners and Beginners and Experts

Monday 25 August 2014

Rebuilding INDEX on Table to increase Performance on SQL Table.

If you have experienced low performance or long running Queries or SP then you have to check Three thinks
  1. Statistics of Table
  2. Index of Table
  3. Operators/Technique used in Table (IN/Exists Operator)

1) Statistics of Table

DBCC SHOW_STATISTICS('Tablename','Primarykeyconstriantname')

Update Statistics Tablename

2)Index of Table

ALTER INDEX ALL ON Tablename
REORGANIZE

ALTER INDEX ALL ON Tablename
REBUILD

3)Technique used in Statements/Code in SP

Exists Operator Much Better than IN operator (some cases)

No comments:

Post a Comment