Friday, 17 September 2021

index rebuild estimated time

 To rebuild a index, the below query will use full to estimate the approximate time(Not accurate but it will rough estimated time either +\- 30%).


use dbname

go

SELECT    IndexName = name,

IndexSizeGB = CEILING(1.0 * dpages / 128 / 1024),

ETA_Min = CEILING(1.0 * dpages / 128 / 1024) * 1.5,

LogSpaceGBRequired = CEILING(1.0 * dpages / 128 / 1024) * 2,

DataSpaceGBRequired = CEILING(1.0 * dpages / 128 / 1024)

FROM sysindexes

WHERE NAME LIKE ('indexname')

--OR NAME LIKE ('indexname')--If you want use multiple indexes use OR condition


No comments:

Post a Comment

Disable CDC at table level

 How to Disable CDC( Change Data Capture) for tables Change Data Capture (cdc) property is disabled as default.  here I will Query you how t...