66 lines
1.7 KiB
JSON
66 lines
1.7 KiB
JSON
[
|
|
{
|
|
"name": "TestUniqCompEqualEst",
|
|
"cases": [
|
|
"explain select * from t where a = 1 and b = 5 and 1 = 1"
|
|
]
|
|
},
|
|
{
|
|
"name": "TestColumnIndexNullEstimation",
|
|
"cases": [
|
|
"explain select b from t where b is null",
|
|
"explain select b from t where b is not null",
|
|
"explain select b from t where b is null or b > 3",
|
|
"explain select b from t use index(idx_b)",
|
|
"explain select b from t where b < 4",
|
|
"explain select * from t where a is null",
|
|
"explain select * from t where a is not null",
|
|
"explain select * from t where a is null or a > 3",
|
|
"explain select * from t",
|
|
"explain select * from t where a < 4"
|
|
]
|
|
},
|
|
{
|
|
"name": "TestDiscreteDistribution",
|
|
"cases": [
|
|
"explain select * from t where a = 'tw' and b < 0"
|
|
]
|
|
},
|
|
{
|
|
"name": "TestPrimaryKeySelectivity",
|
|
"cases": [
|
|
[
|
|
"explain select * from t where a > \"t\""
|
|
],
|
|
[
|
|
"drop table t",
|
|
"create table t(a int primary key, b int)",
|
|
"explain select * from t where a > 1"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"name": "TestSelectCombinedLowBound",
|
|
"cases": [
|
|
"explain select * from t where kid = 1"
|
|
]
|
|
},
|
|
{
|
|
"name": "TestCollationColumnEstimate",
|
|
"cases": [
|
|
"show stats_buckets",
|
|
"explain select * from t where a='aÄa'",
|
|
"explain select * from t where a > 'aÄa'"
|
|
]
|
|
},
|
|
{
|
|
"name": "TestDNFCondSelectivity",
|
|
"cases": [
|
|
"select * from t where b > 7 or c < 4",
|
|
"select * from t where d < 5 or b > 6",
|
|
"select * from t where a > 8 or d < 4 or c > 7 or b < 5",
|
|
"select * from t where a < 8 and (b > 10 or c < 3 or b > 4) and a > 2"
|
|
]
|
|
}
|
|
]
|