1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Make bitmap heap scans show exact/lossy block info in EXPLAIN ANALYZE.

Etsuro Fujita
This commit is contained in:
Robert Haas
2014-01-13 14:42:16 -05:00
parent c3ccc9ee58
commit 2bb1f14b89
3 changed files with 43 additions and 1 deletions

View File

@ -170,6 +170,11 @@ BitmapHeapNext(BitmapHeapScanState *node)
*/
bitgetpage(scan, tbmres);
if (tbmres->ntuples >= 0)
node->exact_pages++;
else
node->lossy_pages++;
/*
* Set rs_cindex to first slot to examine
*/
@ -553,6 +558,8 @@ ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags)
scanstate->tbm = NULL;
scanstate->tbmiterator = NULL;
scanstate->tbmres = NULL;
scanstate->exact_pages = 0;
scanstate->lossy_pages = 0;
scanstate->prefetch_iterator = NULL;
scanstate->prefetch_pages = 0;
scanstate->prefetch_target = 0;