Is there a query to set a table's engine to innodb if it's not already?
-
31-10-2019 - |
Pregunta
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 <if not already innodb>
Why does the second query have such a delay? (out of curiosity mostly)
No hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a dba.stackexchange