Adjust nodeBitmapIndexscan to keep the target index opened from plan

Tom Lane <tgl@sss.pgh.pa.us>

Commit: db70a312941d7e20d9fff6bbe7d6e9ccf59294e0
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-05-05T03:37:23Z
Releases: 8.1.0
Adjust nodeBitmapIndexscan to keep the target index opened from plan
startup to end, rather than re-opening it in each MultiExecBitmapIndexScan
call.  I had foolishly thought that opening/closing wouldn't be much
more expensive than a rescan call, but that was sheer brain fade.

This seems to fix about half of the performance lossage reported by
Sergey Koposov.  I'm still not sure where the other half went.

Files

PathChange+/−
src/backend/executor/nodeBitmapIndexscan.c modified +43 −29
src/include/nodes/execnodes.h modified +5 −1