Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have no experience with MySQL. My boss ran an optimize against a MySQL database. Against a bunch of views we got the message

"tablexyz" is not BASE TABLE

and the next has message is


It seems to be only against views, we didn't get any of these error messages against the base tables.

Does this look like an incorrect error message, or do we have issues with our tables?

share|improve this question

You cannot run OPTIMIZE TABLE against a View. I can see why the error message would be Corrupt

In mysql, a view is represented as a table in INFORMATION_SCHEMA.TABLES.

I have discussed views in this light before

However, a View in INFORMATION_SCHEMA.TABLES has NULL as a Storage Engine.

Consequently, there must be a storage engine to optimize on. Since the Storage Engine is NULL, Corrupt error message is understandable. Therefore, don't be concerned with the error message. Just run OPTIMIZE TABLE on the underlying base tables.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.