Methods for Generating Statistics
You can generate database statistics using any of the following methods:
• optimizedb command
• CREATE STATISTICS statement
• WITH STATISTICS option of the COPY FROM command
• Using Director or VDBA
• --stats option of the vwload command (for X100 tables only)
• Let Actian X do it automatically (“autostats” feature)
Automatic Histogram Generation
Actian X can automatically construct histograms from live data. After a server is started, the histograms are added as required, but left in cache for later reuse.
Histograms are automatically generated only for those columns that do not already have histograms stored in the catalog.
A typical use strategy is to create histograms (with optimizedb or CREATE STATS) for columns whose distribution does not change, and then let Actian X generate the new histograms on the other, more dynamic, columns for every server cycle.
Alternatively, if you do not want to use optimizedb or CREATE STATS, you can simply let Actian X automatically build histograms on all columns.
This feature is enabled by setting the opf_autostats DBMS Server configuration parameter in config.dat to ON (automatically generates histograms for both Ingres and X100 tables). The current default is X100.
The COPY STATISTICS statement can be used to copy in-memory statistics that were automatically generated into the system catalogs so that they are available after a restart.
Last modified date: 04/03/2024