HANDLER

Syntax:

HANDLER table_name OPEN [AS alias_name]

HANDLER table_name READ index_name {= | >= | <= | <} (value1, value2,...)
  [WHERE...] [LIMIT num_rows]

HANDLER table_name READ index_name {FIRST | NEXT | PREV | LAST}
  [WHERE...] [LIMIT num_rows]

HANDLER table_name READ {FIRST | NEXT }
  [WHERE...] [LIMIT num_rows]

HANDLER table_name CLOSE

Description: Runs a query through the table interface directly without using the query optimizer. It is a low-level command compared with SELECT.

The first form, using keyword OPEN, opens a table so that it may be read by the following READ commands. The table will not be shared until the HANDLER...CLOSE command is issued or the thread dies.

The first form of HANDLER...READ fetches one row (or num_rows if there is a LIMIT clause) where the index index_name compares as specified with value1 and the WHERE condition is met. An index may incorporate several columns, so a list of values may be specified, starting from the leftmost column of the index.

The second form of HANDLER...READ fetches one row (or num_rows if there is a LIMIT clause) where the WHERE condition is met, in index order.

The third form of HANDLER...READ fetches one row (or num_rows if there is a LIMIT clause) where the WHERE condition is met, in the order of the rows in the table.

See also: SELECT

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.200.109