sp_dbcc_statisticsreport

Description

Generates an allocation statistics report on the specified object in the target database.

Syntax

sp_dbcc_statisticsreport [dbname [, objectname 
	[, date]]]

Parameters

dbname

specifies the target database. If dbname is not specified, the report contains information on all databases in dbccdb..dbcc_operation_log.

objectname

specifies the name of the table or index for which you want the report generated. If you do not specify objectname, Adaptive Server reports statistics on all objects in the target database.

date

specifies the date on which the dbcc checkstorage operation was performed. If you do not specify date, Adaptive Server uses the date of the most recent operation.

Examples

Example 1

Generates a statistics report on the sysobjects table in the sybsystemprocs database:

sp_dbcc_statisticsreport 'sybsystemprocs', 'sysobjects'
Statistics Report on object sysobjects in database sybsystemprocs

 Parameter Name            Index Id Value        
 ------------------------- -------- ------------ 
 count                     0        241.0        
 max size                  0        99.0         
 max count                 0        22.0         
 bytes data                0        19180.0      
 bytes used                0        22113.0      
 count                     1        14.0         
 max size                  1        9.0          
 max level                 1        0.0          
 max count                 1        14.0         
 bytes data                1        56.0         
 bytes used                1        158.0        
 count                     2        245.0        
 max level                 2        1.0          
 max size                  2        39.0         
 max count                 2        71.0         
 bytes data                2        4377.0       
 bytes used                2        6995.0       
 
  Parameter Name  Index Id  Partition  Value   Dev_name
 ---------------  --------  ---------  ------  -------------
 page gaps               0          1    13.0  master
 pages used              0          1    15.0  master
 extents used            0          1     3.0  master
 overflow pages          0          1     0.0  master
 pages overhead          0          1     1.0  master
 pages reserved          0          1     7.0  master
 page extent gaps        0          1    11.0  master
 ws buffer crosses       0          1     2.0  master
 page extent crosses     0          1    11.0  master
 pages used              1          1     2.0  master
 extents used            1          1     1.0  master
 overflow pages          1          1     0.0  master
 pages overhead          1          1     1.0  master
 pages reserved          1          1     6.0  master
 page extent gaps        1          1     0.0  master
 ws buffer crosses       1          1     0.0  master
 page extent crosses     1          1     0.0  master
 page gaps               2          1     4.0  master
 pages used              2          1     6.0  master
 extents used            2          1     1.0  master
 overflow pages          2          1     0.0  master
 pages overhead          2          1     1.0  master
 pages reserved          2          1     2.0  master
 page extent gaps        2          1     0.0  master
 ws buffer crosses       2          1     0.0  master
 page extent crosses      2         1     0.0  master

Usage

Permissions

Any valid user for the database name specified can run sp_dbcc_statisticsreport.

See also

Commands dbcc

dbcc stored procedures sp_dbcc_fullreport, sp_dbcc_summaryreport, sp_dbcc_updateconfig