Search Results
https://dev.mysql.com/doc/internals/en/optimizer-and-relations.html
Here's an example: CREATE TABLE Table1 (s1 INT, s2 INT); CREATE INDEX Index1 ON Table1 (s2); CREATE INDEX Index2 ON Table1 (s1); ... SELECT * FROM Table1 WHERE s1 = 5 AND s2 = 5; When choosing a strategy to solve this query, the optimizer picks s2 = ... An ANDed search has the form condition1 AND condition2, as in this example: WHERE column1 = 'x' AND column2 = 'y' Here, the optimizer's decision process can be described as follows: If (neither condition is indexed) use sequential ...
https://dev.mysql.com/doc/internals/en/optimizer-features-to-trace.html
They are: Greedy search: with a N-table join, this could explore factorial(N) plans Range optimizer Dynamic range optimization (known as "range checked for each record" in EXPLAIN output: each outer row causes a re-run of the range optimizer) ...
https://dev.mysql.com/doc/internals/en/optimizer-index-join-type.html
Consider this query: SELECT column1 FROM Table1; If column1 is indexed, then the optimizer may choose to retrieve the values from the index rather than from the table. For this query: SELECT column1, column2 FROM Table1; the optimizer will use join ...An index which is used this way is called a covering index in most ...
https://dev.mysql.com/doc/internals/en/optimizer-late-nulls-filtering.html
Suppose we have a query plan with table tblX being accessed via the ref access method: tblX.key_part1 = expr1 AND tblX.key_part2 = expr2 AND ... Before performing an index lookup, we determine whether any of the expri values is NULL. If it is, we ...
https://dev.mysql.com/doc/internals/en/optimizer-order-by-clauses.html
For the query: SELECT column1 FROM Table1 ORDER BY 'x'; the optimizer will throw out the ORDER BY clause. For the query: SELECT column1 FROM Table1 ORDER BY column1; the optimizer will use an index on column1, if it exists. For the query: SELECT ...
https://dev.mysql.com/doc/internals/en/optimizer-tracing.html
The interface is provided by a set of optimizer_trace_xxx system variables and the INFORMATION_SCHEMA.OPTIMIZER_TRACE table, but is subject to change. In MySQL 5.6, a new tracing capability was added to the MySQL optimizer.
https://dev.mysql.com/doc/internals/en/other-unsafe-statements.html
Status of this subsection: not started 2009-10-21 INSERT DELAYED LIMIT System tables .
https://dev.mysql.com/doc/internals/en/packet-ERR_Packet.html
This packet signals that an error occurred. It contains a SQL state value if CLIENT_PROTOCOL_41 is enabled. Payload Type Name Description int<1> header [ff] header of the ERR packet int<2> error_code error-code if capabilities & CLIENT_PROTOCOL_41 ...
https://dev.mysql.com/doc/internals/en/parsing-key-information.html
The information in the key is obtained by iterating through the key, which is formatted the same as the definition in table->key_info[index]->key_part[part_num]. Many of the index methods pass a byte array named *key that identifies the index entry ...
https://dev.mysql.com/doc/internals/en/protocoltext-resultset.html
A query like SELECT @@version_comment returns: 01 00 00 01 01|27 00 00 02 03 64 65 66 00 00 00 .....'....def... 11 40 40 76 65 72 73 69 6f 6e 5f 63 6f 6d 6d 65 .@@version_comme 6e 74 00 0c 08 00 1c 00 00 00 fd 00 00 1f 00 00| nt..............