aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_gist.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-10-25 17:19:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-10-25 17:19:26 +0000
commit038e45d2cfd4972350024163c36b05fb6cfd474a (patch)
treefe74fae777e45413ef441281fe436d406690ac05 /contrib/btree_gist/btree_gist.h
parent642257c0a3aac88af3a28cb6bd60c7841d796cbe (diff)
downloadpostgresql-038e45d2cfd4972350024163c36b05fb6cfd474a.tar.gz
postgresql-038e45d2cfd4972350024163c36b05fb6cfd474a.zip
Add a heuristic to transformAExprIn() to make it prefer expanding "x IN (list)"
into an OR of equality comparisons, rather than x = ANY(ARRAY[...]), when there are Vars in the right-hand side. This avoids a performance regression compared to pre-8.2 releases, in cases where the OR form can be optimized into scans of multiple indexes. Limit the possible downside by preferring this form only when the list isn't very long (I set the cutoff at 32 elements, which is a bit arbitrary but in the right ballpark). Per discussion with Jim Nasby. In passing, also make it try the OR form if it cannot select a common type for the array elements; we've seen a complaint or two about how the OR form worked for such cases and ARRAY doesn't.
Diffstat (limited to 'contrib/btree_gist/btree_gist.h')
0 files changed, 0 insertions, 0 deletions