3

I imported all of our database to a new server. When I looked at the tables I see the indexes, but they all show a cardinality of 0. If I remove one index and add it back in, it triggers all the other indexes to run, but there's 180 tables. Is there a way to force all the tables to run their indexes?

asked Jul 9, 2010 at 6:28
0

2 Answers 2

2

You could try mysqlcheck. Your specific requirements may be different, so check the docs, but something along these lines might help:

mysqlcheck -u root -p <dbname> --auto-repair --check --optimize --databases

The --optimize flag is probably the most important in your case. Be sure to note the comments in the first paragraph of the docs about the locks that are placed on tables while this command is running.

answered Jul 9, 2010 at 6:42
Sign up to request clarification or add additional context in comments.

Comments

0

Try Rebuilding or Repairing Tables or Indexes. It sounds like you basically need to rebuild all your indices.

answered Jul 9, 2010 at 6:46

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.