Search Results
https://dev.mysql.com/doc/internals/en/optimizer-code-concepts.html
This section discusses key optimizer concepts, terminology, and how these are reflected in the MySQL server source code.
https://dev.mysql.com/doc/internals/en/optimizer-definitions.html
This description uses a narrow definition: The optimizer is the set of routines which decide what execution path the DBMS should take for queries. To make that easy, this description includes notes referring to the relevant file and routine, such ...MySQL changes these routines frequently, so you should compare what is said here with what's in the current source ...
https://dev.mysql.com/doc/internals/en/optimizer-determining-join-type.html
The optimizer can use the join type to pick a driver expression. When evaluating a conditional expression, MySQL decides what join type the expression has. (Again: despite the word “join”, this applies for all conditional expressions, not just ...
https://dev.mysql.com/doc/internals/en/optimizer-folding-constants.html
It is quite easy for the optimizer to put such expressions together. A transformation takes place for this expression: WHERE column1 = 1 + 2 which becomes: WHERE column1 = 3 Before you say, “but I never would write 1 + 2 in the first place”, ...
https://dev.mysql.com/doc/internals/en/optimizer-late-nulls-filtering.html
This optimization reuses the null_rejecting attribute produced by the early NULLs filtering code (see Section 7.3.1.1, “Early NULLs Filtering”). Suppose we have a query plan with table tblX being accessed via the ref access method: ...
https://dev.mysql.com/doc/internals/en/optimizer-not-relations.html
It is a logical rule that column1 <> 5 is the same as column1 < 5 OR column1 > 5 However, MySQL does not transform in this circumstance. If you think that a range search would be better, then you should do your own transforming in such cases. It is ...
https://dev.mysql.com/doc/internals/en/optimizer-nulls-filtering.html
This section discusses the NULLs filtering optimization used for ref and eq_ref joins.
https://dev.mysql.com/doc/internals/en/optimizer-union-queries.html
Therefore, for this query: SELECT * FROM Table1 WHERE column1 = 'x' UNION ALL SELECT * FROM TABLE1 WHERE column2 = 'y' if both column1 and column2 are indexed, then each SELECT is done using an indexed search, and the result sets are merged. Notice ...
https://dev.mysql.com/doc/refman/8.4/en/data-size.html
The compact family of row formats also optimizes CHAR column storage when using a variable-length character set such as utf8mb3 or utf8mb4. Design your tables to minimize their space on the disk. This can result in huge improvements by reducing the ...
https://dev.mysql.com/doc/refman/8.4/en/optimizer-tracing-typical-usage.html
To perform optimizer tracing entails the following steps: Enable tracing by executing SET optimizer_trace="enabled=ON". See Section 10.15.3, “Traceable Statements”, for a listing of statements which can be traced. To examine traces for multiple ...