Poke by DBA last two weeks due to one of the index creation causing too large spaces in production DB. I know how to create index, how to tune the query performance but when comes to index spaces –> no idea. Talked to them and get this SP_SPACEUSED:


This TSQL is to displays the number of rows, disk space reserved, and disk space used by a table, indexed view, or Service Broker queue in the current database, or displays the disk space reserved and used by the whole database.

What i did is run this TSQL ‘before’ and ‘after’ the index creation, so i can know how much the index cost in DB and do neccessary adjustment accordingly.