Commit 410bed2
committed
Improve GiST index search performance for trigram regex queries.
The initial coding just descended the index if any of the target trigrams
were possibly present at the next level down. But actually we can apply
trigramsMatchGraph() so as to take advantage of AND requirements when there
are some. The input data might contain false positive matches, but that
can only result in a false positive result, not false negative, so it's
safe to do it this way.
Alexander Korotkov1 parent e08fdf1 commit 410bed2
1 file changed
+13
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
404 | 405 | | |
405 | | - | |
406 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
407 | 415 | | |
408 | 416 | | |
409 | 417 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
| 418 | + | |
415 | 419 | | |
| 420 | + | |
| 421 | + | |
416 | 422 | | |
417 | 423 | | |
418 | 424 | | |
| |||
0 commit comments