NET Expert.

مباحث ویژه و پیشرفته در برنامه نویسی دات نت فریم ورک

NET Expert.

مباحث ویژه و پیشرفته در برنامه نویسی دات نت فریم ورک

مشاهده میزان Fragmentation مربوط به Identity جداول


DECLARE
@ID int,
@IndexID int,
@IndexName varchar(128)
 
--Set the table and index to be examined
--enter name of index
SELECT @IndexName = 'index_name'
--enter name of table
SET @ID = OBJECT_ID('table_name')
 
--Get the Index Values
SELECT @IndexID = IndID
FROM sysindexes
WHERE id = @ID AND name = @IndexName
 
--Display the fragmentation
DBCC SHOWCONTIG (@id, @IndexID)
نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد