forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit473411f
committed
Avoid extra lookups with nbtree array inequalities.
nbtree index scans with SAOP inequalities (but no SAOP equalities)performed extra ORDER proc lookups for any remaining equality strategyscan keys. This could waste cycles, and caused assertion failures.Keeping around a separate ORDER proc is only necessary for a scan'snon-array/non-SAOP equality scan keys when the scan has at least oneother SAOP equality strategy key (a SAOP inequality shouldn't count).To fix, replace _bt_preprocess_array_keys_final's assertion with a testthat makes the function return early when the scan has no SAOP equalityscan keys.Oversight in commit1b134ca, which enhanced nbtree ScalarArrayOpexecution.Reported-By: Alexander Lakhin <exclusion@gmail.com>Discussion:https://postgr.es/m/0539d3d3-a402-0a49-ed5e-26429dffc4bd@gmail.com1 parenta475a2f commit473411f
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
557 | 557 |
| |
558 | 558 |
| |
559 | 559 |
| |
560 |
| - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
561 | 567 |
| |
562 | 568 |
| |
563 | 569 |
| |
|
0 commit comments
Comments
(0)