I've discovered that MySQL has multiple row formats, and it's possible to specify this or change it. Also, the default ROW_FORMAT has apparently changed over time with MySQL versions, which is understandable.
However, I can't find anywhere that says how to find out what the ROW_FORMAT of an existing table is! My database has been around for years, from older versions of MySQL, and I want to make sure I'm not using a poorly performing ancient disk format.
How do I find out the ROW_FORMAT of a table in MySQL?
Information schema offers a wealth of information.
SELECT row_format FROM information_schema.tables
WHERE table_schema="YOUR DB" AND table_name="YOUR TABLE" LIMIT 1;
The following query will give you the row format of all tables in the current database:
SELECT `table_name`, `row_format`
FROM `information_schema`.`tables`
WHERE `table_schema`=DATABASE();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With