This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-17. For the latest, interactive version please visit https://mariadb.com/kb/.

Build index on large table

How build index on very large table efficient?

Answer Answered by Jeff Dyke in this comment.

I have always used pt-online-schema-change (https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html). It keeps the table in tact and updates a new one, while using triggers to ensure the new one is up to date. I would always recommend trying this on a non-production server first, but i used this consistently and successfully for years.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.