Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd4635b1

Browse files
committed
Prevent bitmap heap scans from showing unnecessary block info in EXPLAIN ANALYZE.
EXPLAIN ANALYZE shows the information of the numbers of exact/lossy blocks whichbitmap heap scan processes. But, previously, when those numbers were both zero,it displayed only the prefix "Heap Blocks:" in TEXT output format. This is strangeand would confuse the users. So this commit suppresses such unnecessary information.Backpatch to 9.4 where EXPLAIN ANALYZE was changed so that such information wasdisplayed.Etsuro Fujita
1 parentab77485 commitd4635b1

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

‎src/backend/commands/explain.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,13 +1937,16 @@ show_tidbitmap_info(BitmapHeapScanState *planstate, ExplainState *es)
19371937
}
19381938
else
19391939
{
1940-
appendStringInfoSpaces(es->str,es->indent*2);
1941-
appendStringInfoString(es->str,"Heap Blocks:");
1942-
if (planstate->exact_pages>0)
1943-
appendStringInfo(es->str," exact=%ld",planstate->exact_pages);
1944-
if (planstate->lossy_pages>0)
1945-
appendStringInfo(es->str," lossy=%ld",planstate->lossy_pages);
1946-
appendStringInfoChar(es->str,'\n');
1940+
if (planstate->exact_pages>0||planstate->lossy_pages>0)
1941+
{
1942+
appendStringInfoSpaces(es->str,es->indent*2);
1943+
appendStringInfoString(es->str,"Heap Blocks:");
1944+
if (planstate->exact_pages>0)
1945+
appendStringInfo(es->str," exact=%ld",planstate->exact_pages);
1946+
if (planstate->lossy_pages>0)
1947+
appendStringInfo(es->str," lossy=%ld",planstate->lossy_pages);
1948+
appendStringInfoChar(es->str,'\n');
1949+
}
19471950
}
19481951
}
19491952

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp