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:
@ -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;
|
||||
|
Reference in New Issue
Block a user