I have searched the forum, but all Q&A related to this are very old (some dating back to 2012-2013).
So, ¿is it safe to run mysqloptimize -o databasename
on a PXC 5.7 cluster on 2023?
I have searched the forum, but all Q&A related to this are very old (some dating back to 2012-2013).
So, ¿is it safe to run mysqloptimize -o databasename
on a PXC 5.7 cluster on 2023?
Hi @nublaii,
I’d not run “optimize table” in PXC directly. We can do that two ways:
pt-online-schema-change --execute --alter "ENGINE=InnoDB"
Let me know how would you go about this. BTW can you enlighten me, what command / script is this " mysqloptimize
"?
Thanks,
K
Hi there
It is just a symlink to mysqlcheck, it comes from the package percona-xtradb-cluster-client (using ubuntu).
lrwxrwxrwx 1 root root 10 May 18 20:28 /usr/bin/mysqloptimize -> mysqlcheck
@nublaii,
Can you explain why you want to run OPTIMIZE TABLE on all tables in your PXC? If you are trying to reclaim disk space, go with @kedarpercona solution above. If you want to simply update the index statistics, you can use ANALYZE TABLE
at any time.
Unanswered | Unsolved | Solved
MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright © 2006 - 2024 Percona LLC. All rights reserved.