On my site I have a visitor\'s table with 10 million rows.
Every request to the site inserts row to the table, in case the table is locked (usually in optimize query) v
oleksii.svarychevskyi is right, InnoDB uses row level locks, but if you do
ALTER TABLE table_name ENGINE = InnoDB;to change table_name from MyIsam to InnoDB, there will be a metadata locking (at table level) because the original table engine was MyIsam.
The easiest way is
ALTER TABLE table_name ENGINE = InnoDB;
If you use InnoDB engine you should not worry about locking tables, because this engine locks data by rows.