Search

Monday, 3 September 2018

How much space a sql table is using and Quick way to check row count

Today came across this one which is quite handy as it returns the result set quick and also far better than select count statement as it gives row count and space used by the table


USE [@Database name]

EXEC sys.sp_spaceused [@Tablename]

Adventure Works Example


USE [AdventureWorks]
EXEC sys.sp_spaceused [person.Address]


Snapshot



No comments:

Post a Comment