12. Using the Query Optimizer : Database Statistics : Types and Levels of Statistics Collected : Non-Sampled and Sampled Statistics
 
Share this page                  
Non-Sampled and Sampled Statistics
When generating statistics for a database, by default all rows of the selected tables are used in the generation of statistics. These non-sampled statistics represent the most accurate statistics possible, because all data is considered.
When the base table is large, you may want to use sampled statistics. With a sufficient sampling, statistics created are almost identical to statistics created on the full table. The processing for sampled statistics is discussed in greater detail in Sampled Optimizer Statistics.
Generate Sampled Statistics
In VDBA, to specify a percentage of rows to be sampled, enable Statistics on Sample Data check box, and specify the percentage using the Percentage control in the Optimize Database dialog.