Tag Info

New answers tagged

0

Since OPTIMIZE TABLE, ANALYZE TABLE, and REPAIR TABLE are DDL, full table locks are required. However, if all data is InnoDB, the latest version of MySQL is a little more lenient with DDL locks. Note the current MySQL Documentation on OPTIMIZE TABLE in InnoDB: Prior to Mysql 5.6.17, OPTIMIZE TABLE does not use online DDL (ALGORITHM=INPLACE). ...


0

The update statements works perfectly fine without the select before! Since single statements are safe by definition, even two UPDATE queries performed at the same time only will result in the row incremented twice. If you actually want to select the value for your PHP script, do something with it and later want to update this exact counter value, you can ...



Top 50 recent answers are included