One of the basic Database Rule I have is that all the table must Clustered Index. Clustered Index speeds up performance of the query ran on that table. Clustered Index are usually Primary Key but not necessarily.
SELECT OBJECT_NAME(i.OBJECT_ID) AS tableName, rowsFROM sys.indexes iINNER JOIN sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_idWHERE i.INDEX_ID = 0AND OBJECTPROPERTY(i.OBJECT_ID,'IsUserTable') = 1ORDER BY 2 DESC
Post a Comment
Post a Comment