Re: Wrong example in the bloom documentation

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Wrong example in the bloom documentation
Date: 2020-10-26 23:18:52
Message-ID: 20201026231852.GB4951@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Mon, Oct 26, 2020 at 05:04:09PM -0400, Bruce Momjian wrote:
> On Sat, Oct 17, 2020 at 01:50:26PM +0000, Daniel Westermann (DWE) wrote:
> > On Fri, Oct  9, 2020 at 11:08:32AM -0400, Bruce Momjian wrote:
> > >This is not applying to PG 12 or earlier because the patch mentions JIT,
> > >which was only mentioned in the PG bloom docs in PG 13+.
> >
> > Does that mean we need separate patches for each release starting with 10?
> > As I am not frequently writing patches, I would need some help here.
>
> I can regenerate the output for older versions using your patch.
> However, I am confused about the parallelism you are seeing. Your patch
> shows:
>
> Without the two indexes being created, a parallel sequential scan will happen for the query below:
> -------------------
> <programlisting>
> =# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
> QUERY PLAN
> ---------------------------------------------------------------------------------------------------
> Seq Scan on tbloom (cost=0.00..214.00 rows=1 width=24) (actual time=2.729..2.731 rows=0 loops=1)
> Filter: ((i2 = 898732) AND (i5 = 123451))
> Rows Removed by Filter: 10000
> Planning Time: 0.257 ms
> Execution Time: 2.764 ms
> (5 rows)
>
> However, I don't see any parallelism in this output. Also, I don't see
> any parallelism once the indexes are created. What PG version is this?
> and what config settings did you use? Thanks.

I figured it out --- you have to use the larger generate_series value to
get the parallel output. I have adjusted all the docs back to 9.6 to
show accurate output for that version, and simplified the query
ordering --- patch to master attached. The other releases are similar.
Daniel, please let me know if I have left out any details.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

Attachment Content-Type Size
master.diff text/x-diff 9.4 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2020-10-27 02:38:32 Re: Word fix
Previous Message Bruce Momjian 2020-10-26 21:04:09 Re: Wrong example in the bloom documentation

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2020-10-26 23:30:15 Re: Non-configure build of thread_test has been broken for awhile
Previous Message David G. Johnston 2020-10-26 22:46:10 Re: Add important info about ANALYZE after create Functional Index