SQL/MP Installation and Management Guide

Enhancing Performance
HP NonStop SQL/MP Installation and Management Guide523353-004
14-14
Altering Statistics
This example obtains statistics on the columns of the table:
>> SELECT TABLENAME, COLNAME, UNIQUEENTRYCOUNT,
+> SECONDHIGHVALUE, SECONDLOWVALUE
+> FROM $VOL.PERSNL.COLUMN
+> WHERE TABLENAME = "\PHOENIX.$VOL.PERSNL.EMPLOYEE";
TABLENAME COLNAME
---------------------------------- -------------------------
UNIQUEENTRYCOUNT SECONDHIGHVALUE SECONDLOWVALUE
------------------- -------------------- -------------------
\PHOENIX.$VOL.PERSNL.EMPLOYEE EMPNUM
57 +000000000000000343 +000000000000000029
\PHOENIX.$VOL.PERSNL.EMPLOYEE FIRST_NAME
50
\PHOENIX.$VOL.PERSNL.EMPLOYEE LAST_NAME
53
\PHOENIX.$VOL.PERSNL.EMPLOYEE DEPTNUM
11 +000000000000004000 +000000000000001500
\PHOENIX.$VOL.PERSNL.EMPLOYEE JOBCODE
9 +000000000000000600 +000000000000000250
\PHOENIX.$VOL.PERSNL.EMPLOYEE SALARY
46 +0000000000138000.40 +0000000000019000.00
--- 6 row(s) selected.
Altering Statistics
You can alter the statistics in the test database to represent the data and structure of
the production database for the queries and programs you want to test.
To update the catalog entries in the test database, you must first set up a licensed
SQLCI2 process as described in Appendix A, Licensed SQLCI2 Process. Use the
licensed SQLCI2 process to update the associated column in the test catalog with the
value obtained in the queries shown previously. These examples show how to update
the catalog entries.
This example updates the BASETABS table:
>> UPDATE $VOL.PERSNL.BASETABS
+> SET ROWCOUNT = 57
+> WHERE TABLENAME = "\PHOENIX.$VOL.PERSNL.EMPLOYEE";
This example updates the INDEXES table. You must update each index entry in the
INDEXES table.
>> UPDATE $VOL.PERSNL.INDEXES
+> SET INDEXLEVELS = 2
+> WHERE INDEXNAME = "\PHOENIX.$VOL.PERSNL.XEMPDEPT";
This example updates the FILES table. You must update the table and each index
entry in the FILES table.
>> UPDATE $VOL.PERSNL.FILES
+> SET EOF = 12288,