Saturday, 3 February 2018
Power Of Consistency
Monday, 3 July 2017
Quotes That I Love
Doing the same thing again and again,but expecting different results every time -Height of insanity
Every Day above the Earth is the Good Day.
Thursday, 21 April 2016
Wednesday, 20 April 2016
Sunday, 16 November 2014
Reason for Gap in Identiy Columns
There are many reasons for the gaps in identity columns,it may be due to the deletion of record,hard reset of identity column or due to the roll back of the transaction or else due to shutdown of the sql server. Below links explain them in detail.
Friday, 17 October 2014
Defragmentation
Query to find the fragmentation percent
SELECT OBJECT_NAME(A.OBJECT_ID),avg_fragmentation_in_percent,* FROM SYS.DM_DB_INDEX_PHYSICAL_STATS(DB_ID(),NULL,NULL,NULL,NULL) A INNER JOIN SYS.INDEXES B on a.index_id = b.index_id AND A.OBJECT_ID= B.OBJECT_ID AND database_id = DB_ID() AND (index_type_desc ='CLUSTERED INDEX' or index_type_desc ='NONCLUSTERED INDEX') ORDER BY 2
To Reorganize the Index can use the below code ALTER INDEX INDEXNAME ON TABLENAME REORGANIZE
Useful Links
Subscribe to:
Posts (Atom)

