I just tried out EXPLAIN UPDATE in MySQL 5.6 and found unexpected results.

This query has no usable index:

EXPLAIN UPDATE ... WHERE col1 = 9 AND col2 = 'something'\G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: foo
         type: index
possible_keys: NULL
          key: PRIMARY
      key_len: 55
          ref: NULL
         rows: 51
        Extra: Using where

The EXPLAIN output makes it seem like a perfectly fine query, but it’s a full table scan. If I do the old trick of rewriting it to a SELECT I see that:

*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: foo
         type: ALL
possible_keys: NULL
          key: NULL
      key_len: NULL
          ref: NULL
         rows: 51
        Extra: Using where

Should I file this as a bug? It seems like one to me.

Done! Now Read These:

Continuous integration and deployment

It feels like continuous integration and deployment is under-solved.

MySQL isn't limited to nested-loop joins

MySQL is adding more sophisticated query plans over time.

It happened again

Oracle released a huge batch of MySQL improvements and blog posts all at once, again.