Running update statistics

The update statistics command updates column-related statistics, such as histograms and densities.

  1. In the Administration Console view, select ASE Servers > Schema Objects > Tables > User Tables.
  2. Select the table on which to run update statistics.
  3. Select Update Statistics.
    You see the Introduction screen of the Update Statistics wizard for the table you selected.
  4. Click Next.
  5. On the Command Type screen, select the update statistics command to run. Click Next.
  6. On the Data Partitions screen, select Specify a data partition, if applicable, and indicate any data partitions. update statistics runs on all partitions if you do not specify one. Click Next.
  7. On the Columns screen, indicate if you want:
    • To run update statistics on specific columns.
    • Histograms on all columns (the default).
    • To updates statistics in ordered column grouping. Adaptive Servers earlier than 15.7 ESD #2 support only ordered grouping statistics; the histograms option is unavailable.
  8. Click Next.
  9. On the Indexes screen (not available if you selected update all statistics on the Command Type tab, or specified any columns on the Columns tab), indicate any indexes on which to run update statistics. If you do not select any indexes, update statistics updates all indexes.
  10. Click Next.
  11. On the Index Partitions screen (visible when you select an index on the Indexes screen), indicate the index partition to update.
  12. Click Next.
  13. On the Hashing screen, select:
    • The type of hashing:
      • Partial hashing – for columns that have 65536 or fewer unique values.
      • With hashing – for columns that have greater than 65536 unique values.
      • No hashing.
    • A value for max resource granularity (which indicates the maximum percentage of the system’s resources a query can use), if applicable.
  14. Click Next.
  15. On the Histogram Tuning screen, set the histogram tuning factor. The size of the histogram is established by multiplying the number of steps with the value for histogram tuning factor.
  16. Click Next.
  17. On the Sampling screen, specify whether to set sampling, and to what percentage.
  18. Click Next.
  19. On the Step Number screen, indicate if want to set the number of histogram steps, and how many.
  20. Click Next.
  21. On the Consumers screen, set the number of consumer processes to be used in parallel processing, and the number. The controls are enabled if the value for max parallel degree is 3 or greater.
  22. Click Next.
  23. On the DataChange Threshold screen, indicate whether to run update statistics when it reaches a data change threshold, and if so, the value of the threshold.
  24. Click Next.
  25. On the Summary screen, verify your selections.
  26. Click Finish.
Related tasks
Updating Statistics on an Index
Updating Statistics for a Data Partition