Statistics and Sampling

In order to create good query plans, the query optimizer needs information about the size and distribution of table data. The optimizer uses this information to estimate the number of rows produced by different parts of a query plan as it searches to find the best overall plan.

This section explains which statistical methods should be used to gather your database's table data. It also details how to set up those methods on your tables.