Neoview Database Administrator's Guide (R2.5)

SQL>call hp_ustat.chg_auto_list('delete', 'sales', 'parts', ?);
RESPONSE
--------------------------------------------------------------------------------
Table name "SALES.PARTS" DELETEd.
--- SQL operation complete.
Listing the Automated Tables
To list the tables on which UPDATE STATISTICS runs automatically and to display when
UPDATE STATISTICS was last run on a table and if there were errors, query these views:
“HP_USTAT.USTAT_AUTO_LIST View” (page 28)
“HP_USTAT.USTAT_AUTO_LIST_DETAIL View” (page 28)
NOTE: To query these views, you must be logged in as ROLE.DBA.
HP_USTAT.USTAT_AUTO_LIST View
The USTAT_AUTO_LIST view contains all the automated tables. Because the row width of the
view is less than 80 characters, long table and schema names might become truncated in the
view. For full column data, query the USTAT_AUTO_LIST_DETAIL view instead. See Table 5-2.
Table 5-1 USTAT_AUTO_LIST View
DescriptionData TypeColumn Name
Schema name. For a delimited schema name, the name is stored
in internal format, which means that two successive double quotes
are stored as only one double quote.
CHAR(25)SCH_NAME
Table name. For a delimited table name, the name is stored in
internal format, which means that two successive double quotes
are stored as only one double quote.
CHAR(25)TBL_NAME
Time of last UPDATE STATISTICS run. UPDATE STATISTICS
will not be run on a table or materialized view unless the
histograms have been used in the last 5760 minutes or unless
missing histograms need to be generated.
CHAR(11)LAST_RUN
Return value of last UPDATE STATISTICS run. If there was no
error, zero (0) is returned.
CHAR(5)RC
To list all the tables in the USTAT_AUTO_LIST view, execute this SELECT statement:
SQL>SELECT * FROM HP_USTAT.USTAT_AUTO_LIST;
SCH_NAME TBL_NAME LAST_RUN RC
------------------------- ------------------------- ----------- -----
SALES ORDERS 01-01 00:00 0
SALES PARTS 01-01 00:00 0
--- 2 row(s) selected.
For the syntax of the SELECT statement, see the Neoview SQL Reference Manual.
HP_USTAT.USTAT_AUTO_LIST_DETAIL View
The USTAT_AUTO_LIST_DETAIL view displays the full schema and table names, as well as
error text, for each row.
28 Automating Update Statistics and Reorganize Operations