14. Using the Query Optimizer : Database Statistics : Automatic Histogram Generation
Share this page                  
Automatic Histogram Generation
Vector automatically constructs histograms from live data. After a server is started, the histograms are added as required, but left in cache for later reuse.
The histograms are built from sample data maintained in memory by the min-max indexes. This provides accurate histograms with little server overhead.
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 Vector 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 Vector automatically build histograms on all columns.