You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
───────────────────────────────────────────────────────────────── Fine-grained Query Plan ─────────────────────────────────────────────────────────────────
│ Time Cost Loops Rows Width │ Plan Info
┬─ │ 0.1 9.41 1.0 16.0 32 │ NestedLoop join_type=Inner
├┬ │ 0.1 4.62 1.0 2.0 16 │ ➊ Unique
││ │ 0.1 4.61 1.0 2.0 16 │ Sort sort_method=quicksort, sort_space_used=25kB, sort_space_type=Memory
││ │ 0.0 4.6 1.0 2.0 16 │ Append
│├ │ 0.0 2.29 1.0 1.0 16 │ ➋ IndexScan relation_name=Product, scan_direction=Forward, index_name=index of object type 'default::Product' on (.model)
│╰ │ 0.0 2.29 1.0 1.0 16 │ ➌ IndexScan relation_name=Product, scan_direction=Forward, index_name=index of object type 'default::Product' on (.model)
╰─ │ 0.0 2.35 2.0 8.0 32 │ ➊ IndexScan relation_name=ExactProduct, scan_direction=Forward, index_name=ExactProduct.product index
Schema:
type Product {
required property model -> str;
index on (.model);
}
type ExactProduct {
required link product -> Product;
}
The text was updated successfully, but these errors were encountered:
themajashurka
changed the title
Compiler chooses suboptimal plan when filtering on multi cardinality
Compiler makes suboptimal SQL when filtering on multi cardinality
Feb 18, 2025
Two differently written queries with the same meaning yield wildly different plans.
Steps to Reproduce:
Slower
Faster
Schema:
The text was updated successfully, but these errors were encountered: