# Statistics Gathering


![left](./student-guide/diagram/18-Collect-statistics-01-01.png)

------------------------------------------------------------

Collect statistics for tables manually
- WITH NUM BUCKETS is used to specify the maximum number of buckets to generate a histogram.
- WITH NUM TOPN is used to specify an upper limit on the number of TOPNs generated.
- WITH NUM CMSKETCH DEPTH specifies the length of CM Sketch.
- WITH NUM CMSKETCH WIDTH is used to specify the width of CM Sketch.
- WITH NUM SAMPLES is used to specify the number of samples.
