1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.11 into 11.4

This commit is contained in:
Marko Mäkelä
2024-12-02 11:35:34 +02:00
420 changed files with 6452 additions and 4162 deletions

View File

@@ -113,8 +113,6 @@ ANALYZE
}
}
# "Partial match" is used due to NOT IN
# Force rowid-merge partial partial matching
set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off";
analyze format=json select * from t1 where a not in (select b from t2);
ANALYZE
{
@@ -148,77 +146,7 @@ ANALYZE
"subqueries": [
{
"materialization": {
"r_strategy": "index_lookup;array merge for partial match",
"r_loops": 4,
"r_index_lookups": 3,
"r_partial_matches": 1,
"r_partial_match_buffer_size": "REPLACED",
"r_partial_match_array_sizes": ["2"],
"query_block": {
"select_id": 2,
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t2",
"access_type": "ALL",
"loops": 1,
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"r_engine_stats": REPLACED,
"filtered": 100,
"r_filtered": 100
}
}
]
}
}
}
]
}
}
# Force table scan partial matching
set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on";
analyze format=json select * from t1 where a not in (select b from t2);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"select_id": 1,
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
"loops": 1,
"r_loops": 1,
"rows": 4,
"r_rows": 4,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"r_engine_stats": REPLACED,
"filtered": 100,
"r_filtered": 50,
"attached_condition": "!<in_optimizer>(t1.a,t1.a in (subquery#2))"
}
}
],
"subqueries": [
{
"materialization": {
"r_strategy": "index_lookup;full scan for partial match",
"r_strategy": "null-aware index_lookup",
"r_loops": 4,
"r_index_lookups": 3,
"r_partial_matches": 1,
@@ -293,7 +221,7 @@ ANALYZE
"subqueries": [
{
"materialization": {
"r_strategy": "index_lookup;full scan for partial match",
"r_strategy": "null-aware index_lookup",
"r_loops": 4,
"r_index_lookups": 3,
"r_partial_matches": 1,
@@ -328,7 +256,6 @@ ANALYZE
}
}
}
set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off";
analyze format=json select a from t1 group by a not in (select b from t2);
ANALYZE
{
@@ -370,12 +297,10 @@ ANALYZE
"subqueries": [
{
"materialization": {
"r_strategy": "index_lookup;array merge for partial match",
"r_strategy": "null-aware index_lookup",
"r_loops": 4,
"r_index_lookups": 3,
"r_partial_matches": 1,
"r_partial_match_buffer_size": "REPLACED",
"r_partial_match_array_sizes": ["2"],
"query_block": {
"select_id": 2,
"cost": "REPLACED",
@@ -407,7 +332,6 @@ ANALYZE
}
}
}
set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=on";
# Subselect in ORDER BY
analyze format=json select a from t1 order by a in (select b from t2);
ANALYZE
@@ -453,7 +377,7 @@ ANALYZE
"subqueries": [
{
"materialization": {
"r_strategy": "index_lookup;full scan for partial match",
"r_strategy": "null-aware index_lookup",
"r_loops": 4,
"r_index_lookups": 3,
"r_partial_matches": 1,
@@ -520,7 +444,7 @@ ANALYZE
"subqueries": [
{
"materialization": {
"r_strategy": "index_lookup;full scan for partial match",
"r_strategy": "null-aware index_lookup",
"r_loops": 4,
"r_index_lookups": 3,
"r_partial_matches": 1,
@@ -714,7 +638,7 @@ ANALYZE
"subqueries": [
{
"materialization": {
"r_strategy": "index_lookup;full scan for partial match",
"r_strategy": "null-aware index_lookup",
"r_loops": 4,
"r_index_lookups": 3,
"query_block": {
@@ -834,6 +758,7 @@ create table t1 (a1 char(1), a2 char(1));
insert into t1 values (null, 'b');
create table t2 (b1 char(1), b2 char(2));
insert into t2 values ('a','b'), ('c', 'd'), (null, 'e'), ('f', 'g');
# Force rowid-merge partial matching
set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off";
explain format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2);
EXPLAIN
@@ -937,6 +862,7 @@ ANALYZE
]
}
}
# Force table scan partial matching
set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on";
analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2);
ANALYZE