Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.0.12
-
Fix Version/s: 10.0.13
-
Component/s: None
-
Labels:None
Description
We've ported "filesort with small limit" optimization from mysql-5.6 into MariaDB 10.0.
The problem is, it is impossible to see whether that optimization is used or not.
In MySQL, one can check this as follows
- set optimizer_trace=1
- SELECT // need to run SELECT, not EXPLAIN
- select * from optimizer_trace
And then look for something like this:
"join_execution": {
...
"filesort_priority_queue_optimization": {
"limit": 10,
"rows_estimate": 198717,
"row_size": 215,
"memory_available": 262144,
"chosen": true
},
In MariaDB, there is no optimizer_trace, so one can't see it at all.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
It would be logical if the output was reflected in EXPLAIN. The problem is that both MySQL and MariaDB make the decision about whether to use PQ at a very late phase:
EXPLAIN execution does not go through filesort()/check_if_pq_applicable(). In order to check whether we're using PQ in EXPLAIN, one would need to do some code re-structuring.