Skip to content

reindex tables in mariadb in case of slow site

Ashish Shah edited this page Mar 21, 2023 · 2 revisions

Occassionaly, while restoring db from backup the indexing on tables might be broken. This could be verified in recorder, if page load takes unusually long. The solution is to reindex the tables.

https://mariadb.com/kb/en/mysqlcheck/

from terminal using mysqlcheck

reindex all tables

sudo mysqlcheck -a dbname -p

from dbeaver for a specific table

use dbname;
ANALYZE TABLE tabCommunication;
Clone this wiki locally