Returns the number of pages allocated to the specified table or index, and reports pages used for internal structures.
reserved_pgs(object_id, {doampg | ioampg})
is a numeric expression that is an object ID for a table, view, or other database object. These are stored in the id column of sysobjects.
specifies table (doampg) or index (ioampg).
Returns the page count for the syslogs table:
select reserved_pgs(id, doampg) from sysindexes where id = object_id("syslogs")
------------- 534
reserved_pgs, a system function:
Returns the number of pages allocated to a table or an index
Reports pages used for internal structures
Works only on objects in the current database
For general information about system functions, see “System functions”.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute reserved_pgs.
Commands update statistics
Functions data_pgs