Skip scan on a B-tree
The index is on (a, b) but the query tests only b. a has 10 values, so the index can jump from value to value.
task
Write the lookup of b = 5000 so that the planner uses the index.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
The index is on (a, b) but the query tests only b. a has 10 values, so the index can jump from value to value.
Write the lookup of b = 5000 so that the planner uses the index.