From 0d7ba941a9829e081aa976b07d9dfad7ae6278ac Mon Sep 17 00:00:00 2001 From: Manfred Moser Date: Fri, 20 Oct 2023 14:34:35 -0700 Subject: [PATCH] Add docs for table stats with MariaDB --- docs/src/main/sphinx/connector/mariadb.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/src/main/sphinx/connector/mariadb.md b/docs/src/main/sphinx/connector/mariadb.md index 60471a62fe53..2f78a0d702d5 100644 --- a/docs/src/main/sphinx/connector/mariadb.md +++ b/docs/src/main/sphinx/connector/mariadb.md @@ -346,6 +346,26 @@ FROM The connector includes a number of performance improvements, detailed in the following sections. +(mariadb-table-statistics)= +### Table statistics + +The MariaDB connector can use [table and column +statistics](/optimizer/statistics) for [cost based +optimizations](/optimizer/cost-based-optimizations) to improve query processing +performance based on the actual data in the data source. + +The statistics are collected by MariaDB and retrieved by the connector. + +To collect statistics for a table, execute the following statement in +MariaDB. + +```text +ANALYZE TABLE table_name; +``` + +Refer to [MariaDB documentation](https://mariadb.com/kb/en/analyze-table/) for +additional information. + (mariadb-pushdown)= ### Pushdown