Documentation Home
MySQL 9.3 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.8Mb
PDF (A4) - 40.9Mb
Man Pages (TGZ) - 261.1Kb
Man Pages (Zip) - 368.3Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


10.2.5.2 Optimizing UPDATE Statements

An update statement is optimized like aSELECT query with the additional overhead of a write. The speed of the write depends on the amount of data being updated and the number of indexes that are updated. Indexes that are not changed do not get updated.

Another way to get fast updates is to delay updates and then do many updates in a row later. Performing multiple updates together is much quicker than doing one at a time if you lock the table.

For aMyISAM table that uses dynamic row format, updating a row to a longer total length may split the row. If you do this often, it is very important to useOPTIMIZE TABLE occasionally. SeeSection 15.7.3.4, “OPTIMIZE TABLE Statement”.