SQL/MX 2.x Query Guide (H06.04+, J06.03+)
Keeping Statistics Current
HP NonStop SQL/MX Query Guide—540437-005
3-10
Testing the Results for SQL/MX Tables
d. Use EXPLAIN to review the cost information for your query.
e. Use DISPLAY STATISTICS to determine which plan is better.
f. If necessary, use the UPDATE STATISTICS CLEAR option to remove
histograms for unwanted column groups.
g. If necessary, restore backup histogram tables:
> DELETE FROM HISTOGRAMS;
> INSERT INTO HISTOGRAMS SELECT * FROM myhist where
table_uid in (select object_uid from
CAT.DEFINITION_SCHEMA_VERSION_1200.OBJECTS);
> DELETE FROM HISTOGRAM_INTERVALS;
> INSERT INTO HISTOGRAM_INTERVALS SELECT * FROM myhistint
where table_uid in (select object_uid from
CAT.DEFINITION_SCHEMA_VERSION_1200.OBJECTS);










