HANDLER Statement DO  executes the expressions but does not return any results. In most respects,  DO  is shorthand for  SELECT expr , ... , but has the advantage that it is slightly faster when you do not care about the result. DO  is useful primarily with functions that have side effects, such as  RELEASE_LOCK() . Example: This  SELECT  statement pauses, but also produces a result set: mysql>  SELECT SLEEP(5); +----------+ | SLEEP(5) | +----------+ | 0 | +----------+ 1 row in set (5.02 sec) DO , on the other hand, pauses without producing a result set.: mysql>  DO SLEEP(5); Query OK, 0 rows affected (4.99 sec) This could be useful, for example in a stored function or trigger, which prohibit statements that produce result sets. DO  only executes expressions. It cannot be used in all cases where  SELECT  can be used. For example,  DO id FROM t1  is invalid because it references a table. 13.2.4 HANDLER Statement HANDLER  tbl_name  OPEN [ [AS]  alias ] HANDLER  tbl_name  READ  index_name  { = | <= | >= | < | > } ( value1 , value2 ,...) [ WHERE  where_condition  ] [LIMIT ... ] HANDLER  tbl_name  READ  index_name  { FIRST | NEXT | PREV | LAST } [ WHERE  where_condition  ] [LIMIT ... ] HANDLER  tbl_name  READ { FIRST | NEXT } [ WHERE  where_condition  ] [LIMIT ... ] HANDLER  tbl_name  CLOSE The  HANDLER  statement provides direct access to table storage engine interfaces. It is available for InnoDB  and  MyISAM  tables. The  HANDLER ... OPEN  statement opens a table, making it accessible using subsequent  HANDLER ... READ  statements. This table object is not shared by other sessions and is not closed until the session calls HANDLER ... CLOSE  or the session terminates. If you open the table using an alias, further references to the open table with other  HANDLER  statements must use the alias rather than the table name. If you do not use an alias, but open the table using a table name qualified by the database name, further references must use the unqualified table name. For example, for a table opened using  mydb.mytable , further references must use  mytable . The first  HANDLER ... READ  syntax fetches a row where the index specified satisfies the given values and the  WHERE  condition is met. If you have a multiple-column index, specify the index column values as a comma-separated list. Either specify values for all the columns in the index, or specify values for a leftmost prefix of the index columns. Suppose that an index  my_idx  includes three columns named  col_a ,  col_b , and  col_c , in that order. The  HANDLER  statement can specify values for all three columns in the index, or for the columns in a leftmost prefix. For example: HANDLER ... READ my_idx = (col_a_val,col_b_val,col_c_val) ... HANDLER ... READ my_idx = (col_a_val,col_b_val) ... HANDLER ... READ my_idx = (col_a_val) ... 2626