Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

When I run sys.dm_db_index_physical_stats the database for 5 minutes the main production,Is there any way to get it fast?

$
0
0

SELECT index_type_desc,object_id, avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats(5,prod,Lauotse, uyrti , 'DETAILED')where index_type_desc='CLUSTERED INDEX' and avg_fragmentation_in_percent>20;

I have database on which I am running it which is very big around 500 gb and it have very few tables and are very big in size.

When I run this It locks the database for 5 minutes the main production,Is there any way to get it fast?


Thanks


Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>