Sample Header Ad - 728x90

Is there a query to set a table's engine to innodb if it's not already?

1 vote
2 answers
1124 views
I can set a (MyISAM) table's engine to InnoDB using the query: alter table tablename engine=InnoDB which takes some time to complete for large tables. It appears though that if I run the same query again on the same table, it takes some time again (much less but still considerable). I would expect the query to be instantaneous, since the engine is already set to innodb. My questions are: - Is there a single query that conditionally sets the engine, for example alter table tablename engine=InnoDB - Why does the second query have such a delay? (out of curiosity mostly)
Asked by periklis (123 rep)
Apr 3, 2013, 08:32 PM
Last activity: Aug 31, 2021, 01:18 PM