Re: Incorrect EXPLAIN ANALYZE output in bloom index docs

From: Yan Chengpeng <chengpeng_yan(at)Outlook(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Incorrect EXPLAIN ANALYZE output in bloom index docs
Date: 2024-12-10 01:33:44
Message-ID: B61560C1-DD55-43D3-BD40-C28ACA87430E@Outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Dec 9, 2024, at 15:53, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> I was fixing up the patch in [1] with the intention of committing it
> when I noticed that there are a few outdated EXPLAIN ANALYZE examples
> in the documents for the bloom contrib module.
>
> The example outputs look like they've been created with a 100 thousand
> row table, but the commands given are to insert 10 million rows into
> that table. I suspect someone did a 100x on the example row count at
> some point during development and forgot to update the EXPLAIN output.
>
> The patch I want to commit adds buffer outputs to these EXPLAINs, so I
> kinda need to fix these before adding that, otherwise what I want to
> add does not make any sense.
>
> Patch attached. I propose to backpatch this fix.
>
> David
> <v1-0001-Doc-fix-incorrect-EXPLAIN-ANALYZE-output-for-bloo.patch>

Most changes look good to me. Only two small comments here:

1. Why did the following part change from ‘never executed’ to execute. Why the previous state is `never executed`?
```
- -&gt; Bitmap Index Scan on btreeidx2 (cost=0.00..12.04 rows=500 width=0) (never executed)
+ -&gt; Bitmap Index Scan on btreeidx2 (cost=0.00..4.52 rows=11 width=0) (actual time=0.007..0.007 rows=8 loops=1)
```

2. There is one sentence in the old one that says, `Although this query runs much faster than with either of the single indexes, we pay a penalty in index size. Each of the single-column btree indexes occupies 2 MB, so the total space needed is 12 MB, eight times the space used by the bloom index.` I think the size also needs to be changed.

- Yan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2024-12-10 01:53:51 RE: Subscription sometimes loses txns after initial table sync
Previous Message Masahiko Sawada 2024-12-10 01:31:09 Re: Skip collecting decoded changes of already-aborted transactions