Indexes on the tables can get fragmented. In order to detect the fragmentation, following SQL script can be run:
1 | SELECT a.object_id, object_name(a.object_id) AS TableName, |
If fragmentation is higher than %10, then a corrective action should be taken.
Best course of action is to rebuild the indexes, if the table is not too big:
1 | ALTER INDEX ALL ON DB_NAME.dbo.TABLE_NAME REBUILD; |
If the table has too many rows, consider reorganizing. See links below.