Friday, February 24, 2012

Get physical size of indexes

How do I get the physical size of all individual indexes in a database.
Thanks in advance.Hello
There is a topic in SQL Books Online titled "Estimating the Size of a Table
with a Clustered Index" which explains the calculation that you can use to
calculate the approximate size of the clustered and non-clustered index for
a table.
If you want to check the actual size of an existing index, refer to the
Books Online topic on "sysindexes" table. The "dpages", "reserved" and
"used" fields indicate the number of 8K pages as explained in the help
topic. Also please note that you may have to perform DBCC UPDATEUSAGE to
get accurate numbers in these fields.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Be aware however that the dpages, etc , and the info received from
sp_spaceused do NOT get updated with each insert, update or delete. They may
be inaccurate. They OFTEN are inaccurate...
Use DBCC Updateusage
or sp_spaceused @.updateusage = true
to force SQL to read the data and update the size information...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ferde" <Ferde@.discussions.microsoft.com> wrote in message
news:3CF862DA-044A-49E8-ABE3-0F61D90D249A@.microsoft.com...
> How do I get the physical size of all individual indexes in a database.
> Thanks in advance.
>

No comments:

Post a Comment