postgresql/src/backend
Tom Lane 7c70996ebf Allow bitmap scans to operate as index-only scans when possible.
If we don't have to return any columns from heap tuples, and there's
no need to recheck qual conditions, and the heap page is all-visible,
then we can skip fetching the heap page altogether.

Skip prefetching pages too, when possible, on the assumption that the
recheck flag will remain the same from one page to the next.  While that
assumption is hardly bulletproof, it seems like a good bet most of the
time, and better than prefetching pages we don't need.

This commit installs the executor infrastructure, but doesn't change
any planner cost estimates, thus possibly causing bitmap scans to
not be chosen in cases where this change renders them the best choice.
I (tgl) am not entirely convinced that we need to account for this
behavior in the planner, because I think typically the bitmap scan would
get chosen anyway if it's the best bet.  In any case the submitted patch
took way too many shortcuts, resulting in too many clearly-bad choices,
to be committable.

Alexander Kuzmenkov, reviewed by Alexey Chernyshov, and whacked around
rather heavily by me.

Discussion: https://postgr.es/m/239a8955-c0fc-f506-026d-c837e86c827b@postgrespro.ru
2017-11-01 17:38:20 -04:00
..
access Fix problems with the "role" GUC and parallel query. 2017-10-29 12:58:40 +05:30
bootstrap Exclude flex-generated code from coverage testing 2017-10-16 16:28:11 -04:00
catalog Fix typo in comment 2017-10-30 14:37:00 +01:00
commands Fix ALTER TABLE code to update domain constraints when needed. 2017-11-01 13:32:23 -04:00
executor Allow bitmap scans to operate as index-only scans when possible. 2017-11-01 17:38:20 -04:00
foreign Abstract logic to allow for multiple kinds of child rels. 2017-04-03 22:41:31 -04:00
lib Allow to avoid NUL-byte management for stringinfos and use in format.c. 2017-10-11 16:01:52 -07:00
libpq Fix typo 2017-10-19 13:57:20 +02:00
main Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
nodes Support domains over composite types. 2017-10-26 13:47:45 -04:00
optimizer Allow bitmap scans to operate as index-only scans when possible. 2017-11-01 17:38:20 -04:00
parser Dept of second thoughts: keep aliasp_item in sync with tlistitem. 2017-10-27 18:16:24 -04:00
po Translation updates 2017-08-07 13:55:34 -04:00
port Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
postmaster Fix autovacuum work item error handling 2017-10-30 15:52:02 +01:00
regex Mop-up for commit 85feb77aa0. 2017-09-22 11:35:12 -04:00
replication Exclude flex-generated code from coverage testing 2017-10-16 16:28:11 -04:00
rewrite Improve implementation of CRE-stack-flattening in map_variable_attnos(). 2017-10-13 13:43:55 -04:00
snowball Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00
statistics Infer functional dependency past RelabelType 2017-10-12 17:23:47 +02:00
storage Don't exaggerate the number of temporary blocks read. 2017-10-31 14:56:09 +05:30
tcop Replace remaining uses of pq_sendint with pq_sendint{8,16,32}. 2017-10-11 21:00:46 -07:00
tsearch Mop-up for commit 85feb77aa0. 2017-09-22 11:35:12 -04:00
utils Fix ALTER TABLE code to update domain constraints when needed. 2017-11-01 13:32:23 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
Makefile Inject $(ICU_LIBS) regardless of platform. 2017-08-20 21:22:18 -07:00
nls.mk Translation updates 2017-05-15 12:19:54 -04:00