Home » Tables » Sp Spaceused Table Sybase

Sp Spaceused Table Sybase

sp_spaceused Description.

Displays estimates of the number of rows, the number of data pages, the size of indexes, and the space used by a specified table or by all tables in the current database.

Syntax sp_spaceused [objname [,1] ] Parameters objname.

is the name of the table on which to report.

Table 11-1: sp_spaceused output; Column.



Reports an estimate of the number of rows.

The value is read from the OAM page.

Though not always exact, this estimate is much quicker and leads to less contention than select count(*).


Reports pages reserved for use by the table #, sybase sp_spaceused Posted on Jul 03, 2018 at 05:54 PM | 416 Views.


RSS Feed.

Answers Include Comments Get RSS Feed.

Quick question experts.

Newbie to SYB.

We have enabled auto extend on DB however when I run sp_spaceused , I can see that PCT unreserved stands at 85.

30 % which means there is quite a bit of space unreserved and is far.

Table 6-2: Columns in sp_spaceused output; Column.



The name of the database being examined.


The amount of space allocated to the database by create database or alter database.


The amount of space that has been allocated to all the tables and indexes created in the database.

15/06/2007 The PctBloatUsedPages and PctBloatReservedPages columns give an estimate of how many more pages than the minimum the table is using and reserving, respectively.

These values indicate how beneficial it may be for you to run reorg rebuild on the table.

ExtentUtil is the ratio of the number of pages that are actually being used against the number of pages that are reserved for the object.

01/04/2014 One thought on # Sybase ASE: List all tables in the current database and their size # Kevin says: February 12, 2015 at 10:17 PM The second (pre Sybase 15) query only seems to work for tables that have indexes.

I was trying to find same info for massive list of tables in scratchdb where folks drop temporary stuff, but many w/out indexes.

sp_spaceused is one of the frequently used stored procedures when it comes to view the number of rows, reserved size, data size, index size, unused space in a table.

I myself utilized it many a time.

Given below are the three methods to run sp_spaceused or equivalent for all tables in a database to get number of rows, reserved size, data size, index size, unused space but this time we will.

IDENTITY Columns Selected into Tables with Unions or Joins Allow Null Values in a Column Constraints and Rules Used with Null Values Defaults and Null Values Nulls Require Variable-Length Datatypes text, unitext, and image Columns Alter Existing Tables Objects Using select * Do Not List Changes to Table Use alter table on Remote Tables, sp_spaceused (Transact-SQL) 08/14/2017; 10 minutes to read +6; In this article.

APPLIES TO: SQL Server Azure SQL Database Azure Synapse Analytics (SQL DW) Parallel Data Warehouse 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.

Did sp_spaceused ever display the correct results for this table while running ASE 15.



If so, can you recall any major changes (eg, EBF upgrades, recovery of the user or sybsystemprocs databases, etc) to the dataserver since the last time sp_spaceused reported the correct results?

How many rows does the table actually have?

sp spaceused table sybase