Details
-
Task
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
The tests that need to be considered are
subselect_sj_mat.test
|
subselect_sj2_mat.test
|
subselect_no_semijoin.test
|
subselect_no_scache.test
|
subselect_no_opts.test
|
subselect_no_exists_to_in.test
|
subselect.test
|
stat_tables_innodb.test
|
stat_tables.test
|
range_mrr_icp.test
|
range.test
|
join_outer_innodb.test
|
join_cache.test
|
invisible_field.test
|
group_by.test
|
derived_cond_pushdown.test
|
Attachments
Issue Links
- relates to
-
MDEV-15253 Default optimizer setting changes for MariaDB 10.4
-
- Closed
-
MariaDB [test]> analyze
-> SELECT * FROM t1
-> WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
+------+--------------+-------------+--------+---------------+--------------+---------+-----------+------+--------+----------+------------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra |
+------+--------------+-------------+--------+---------------+--------------+---------+-----------+------+--------+----------+------------+--------------------------+
| 1 | PRIMARY | t1 | index | a | a | 5 | NULL | 2 | 2.00 | 100.00 | 0.00 | Using where; Using index |
| 2 | SUBQUERY | t2 | ALL | NULL | NULL | NULL | NULL | 2 | 2.00 | 100.00 | 100.00 | Using where |
| 2 | SUBQUERY | <subquery3> | eq_ref | distinct_key | distinct_key | 4 | test.t2.c | 1 | 0.00 | 100.00 | 100.00 | |
| 3 | MATERIALIZED | t3 | ALL | NULL | NULL | NULL | NULL | 2 | 2.00 | 100.00 | 100.00 | |
+------+--------------+-------------+--------+---------------+--------------+---------+-----------+------+--------+----------+------------+--------------------------+
MariaDB [test]> set optimizer_use_condition_selectivity=1;
Query OK, 0 rows affected (0.000 sec)
MariaDB [test]> analyze SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
+------+--------------+-------------+-------+---------------+------+---------+------+------+--------+----------+------------+-------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra |
+------+--------------+-------------+-------+---------------+------+---------+------+------+--------+----------+------------+-------------------------------------------------+
| 1 | PRIMARY | t1 | index | a | a | 5 | NULL | 2 | 2.00 | 100.00 | 0.00 | Using where; Using index |
| 2 | SUBQUERY | <subquery3> | ALL | distinct_key | NULL | NULL | NULL | 1 | 1.00 | 100.00 | 100.00 | |
| 2 | SUBQUERY | t2 | ALL | NULL | NULL | NULL | NULL | 2 | 2.00 | 100.00 | 0.00 | Using where; Using join buffer (flat, BNL join) |
| 3 | MATERIALIZED | t3 | ALL | NULL | NULL | NULL | NULL | 2 | 2.00 | 100.00 | 100.00 | |
+------+--------------+-------------+-------+---------------+------+---------+------+------+--------+----------+------------+-------------------------------------------------+