aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeBitmapHeapscan.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-04-10 22:25:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-04-10 22:25:26 +0000
commit4e82a954764af0b03c54cd4db422a6b4e585e4e8 (patch)
tree672d349e0181ca7eeeedca63b08ab8b62e0d8750 /src/backend/executor/nodeBitmapHeapscan.c
parentf260edb144c1e3f33d5ecc3d00d5359ab675d238 (diff)
downloadpostgresql-4e82a954764af0b03c54cd4db422a6b4e585e4e8.tar.gz
postgresql-4e82a954764af0b03c54cd4db422a6b4e585e4e8.zip
Replace "amgetmulti" AM functions with "amgetbitmap", in which the whole
indexscan always occurs in one call, and the results are returned in a TIDBitmap instead of a limited-size array of TIDs. This should improve speed a little by reducing AM entry/exit overhead, and it is necessary infrastructure if we are ever to support bitmap indexes. In an only slightly related change, add support for TIDBitmaps to preserve (somewhat lossily) the knowledge that particular TIDs reported by an index need to have their quals rechecked when the heap is visited. This facility is not really used yet; we'll need to extend the forced-recheck feature to plain indexscans before it's useful, and that hasn't been coded yet. The intent is to use it to clean up 8.3's horrid @@@ kluge for text search with weighted queries. There might be other uses in future, but that one alone is sufficient reason. Heikki Linnakangas, with some adjustments by me.
Diffstat (limited to 'src/backend/executor/nodeBitmapHeapscan.c')
-rw-r--r--src/backend/executor/nodeBitmapHeapscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c
index 998ef91097d..3908892bc2a 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/nodeBitmapHeapscan.c,v 1.25 2008/03/26 21:10:38 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeBitmapHeapscan.c,v 1.26 2008/04/10 22:25:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -206,7 +206,7 @@ BitmapHeapNext(BitmapHeapScanState *node)
* If we are using lossy info, we have to recheck the qual conditions
* at every tuple.
*/
- if (tbmres->ntuples < 0)
+ if (tbmres->recheck)
{
econtext->ecxt_scantuple = slot;
ResetExprContext(econtext);