Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.5.0
-
6.5.0-3573,5.5.5-4521
-
Untriaged
-
Yes
Description
Logs:
https://s3.amazonaws.com/bugdb/jira/coveringissue/collectinfo-2019-06-26T182746-ns_1%40cb.local.zip
I have two indexes in my system:
CREATE INDEX `coveringindexwithwhere0` ON `default`(`email`,`VMs`) WHERE (10 < `join_day`)
CREATE INDEX `shortcoveringindex0` ON `default`(`email`) WHERE (10 < `join_day`)
I run this query:
explain select email from default where email LIKE '%@%.%' and join_day > 10
The wrong index is being picked up for this query, before (in 6.5.0-3511) shortcoveringindex0 would be the index picked up for this query, now it is picking up coveringindexwithwhere0.
Found this issue in a weekly regression run, can provide the rest of the test details if required
Here is the explain plan:
[
|
{
|
"plan": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "IndexScan3",
|
"covers": [
|
"cover ((`default`.`email`))",
|
"cover ((`default`.`VMs`))",
|
"cover ((meta(`default`).`id`))"
|
],
|
"filter_covers": {
|
"cover ((10 < (`default`.`join_day`)))": true
|
},
|
"index": "coveringindexwithwhere0",
|
"index_id": "87e6f44c62d85cfc",
|
"index_projection": {
|
"entry_keys": [
|
0
|
]
|
},
|
"keyspace": "default",
|
"namespace": "default",
|
"spans": [
|
{
|
"range": [
|
{
|
"high": "[]",
|
"inclusion": 1,
|
"low": "\"\""
|
}
|
]
|
}
|
],
|
"using": "gsi"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"condition": "((cover ((`default`.`email`)) like \"%@%.%\") and cover ((10 < (`default`.`join_day`))))"
|
},
|
{
|
"#operator": "InitialProject",
|
"result_terms": [
|
{
|
"expr": "cover ((`default`.`email`))"
|
}
|
]
|
},
|
{
|
"#operator": "FinalProject"
|
}
|
]
|
}
|
}
|
]
|
},
|
"text": "select email from default where email LIKE '%@%.%' and join_day > 10"
|
}
|
]
|
Attachments
Issue Links
- is triggered by
-
MB-34665 Avoid IntersectScan when index is subset
- Closed