AI agents/LLMs: Fetch /llms.txt first to access the documentation index. Remove the trailing slash and append .md to any URL to access lighter, easier-to-parse Markdown pages instead of HTML (this page is accessible at https://docs.singlestore.com/db/v8.7/query-data/query-tuning/statistics-and-sampling.md).
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.