Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

sa_table_page_usage system procedure Next Page

sa_table_stats system procedure

Reports information about how many pages have been read from each table.


sa_table_stats( )

Result set
Column nameData typeDescription
table_idINTThe table ID.
creatorCHAR(128)The user name of the table's creator.
table_nameCHAR(128)The table name.
countUNSIGNED BIGINTThe estimated number of rows in the table, taken from SYSTAB.
table_page_countUNSIGNED BIGINTThe number of main pages used by the table.
table_page_cachedUNSIGNED BIGINTThe number of tables pages currently stored in the cache.
table_page_readsUNSIGNED BIGINTThe number of page reads performed for pages in the main table.
ext_page_countUNSIGNED BIGINTThe estimated number of pages in the table
ext_page_cachedUNSIGNED BIGINTReserved for future use.
ext_page_readsUNSIGNED BIGINTReserved for future use.

Each row returned by the sa_table_stats procedure describes a table for which the optimizer is maintaining page statistics. The sa_table_stats procedure can be used to find which tables are using cache memory and how many disk reads are being performed for each table. For example, you can use the sa_table_stats procedure to find the table that is generating the most disk reads. The results of the procedure represent estimates and should be used only for diagnostic purposes.

The table_page_cached column indicates how many pages of the table are currently stored in the cache, and the table_page_reads column indicates how many table pages have been read from disk since the optimizer started maintaining counts for the table. These statistics are not stored persistently within the database; they represent the activity on tables after they are loaded into memory for the first time.


DBA authority required.

Side effects


See also