You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.
RIch Prohaska edited this page Jan 22, 2015
·
12 revisions
Analyze Table
Purpose
When analyze table is executed on a TokuDB table, TokuDB computes the cardinality of the data stored in the
table and makes the cardinality data available to the MySQL query optimizer. See the Cardinality wiki for details on the algorithm used to compute cardinality.
Concurrency
MySQL 5.5 schedules analyze table with a shared read meta data lock. The MDL_SHARED_READ and TL_READ_NO_INSERT meta data locking levels are used. This lock allows concurrent reads to the table, but prohibits concurrent writes to the table, while the table is being analyzed.
Processlist Info
Analyze table scans a bunch of rows from the table to compute cardinality. Since this scan can take some time, TokuDB periodically updates the processlist info for the client running analyze table with an estimate of how much progress the analyze table has made since it started. The progress is computed based on the percentage of rows examined and the percentage of time allowed.