How do I check the size of an indexed view in SQL Server?

Steven de Salas picture Steven de Salas · May 18, 2011 · Viewed 8.3k times · Source

Its easy to check storage sizes for Tables and Indexes, you can right-click the table object on SSMS explorer and voila, the details appear in a nice popup.

But since Indexed Views are displayed the same as Normal Views, there is no storage information avaiable in SSMS to show me the current size taken up on disk.

enter image description here

Is there an alterate way to calculate the size (say via a system SP or similar method)?

Thanks.

Answer

Martin Smith picture Martin Smith · May 18, 2011
EXEC sys.sp_spaceused @objname = N'dbo.YourView'