From: Justin Pryzby <pryzby@telsasoft.com>
To: Lars Bergeson <larsavatar@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Query is slower with a large proportion of NULLs in several columns
Date: Mon, 20 Dec 2021 22:51:38 -0600
Message-ID: <20211221045138.GZ17618@telsasoft.com> (raw)
In-Reply-To: <CAK66RGbd8n46xEp3fTKOa3pO3eC=NT8tEHHZYjuNZq4Y0SQHTw@mail.gmail.com>
References: <CAK66RGYim22Sd8-NvmufcxEQ_P99=UTAyJ9agnwDyEbCiVGEQg@mail.gmail.com>
<2688019.1640051519@sss.pgh.pa.us>
<CAK66RGbd8n46xEp3fTKOa3pO3eC=NT8tEHHZYjuNZq4Y0SQHTw@mail.gmail.com>
On Mon, Dec 20, 2021 at 08:11:42PM -0800, Lars Bergeson wrote:
> ok, here are results after I did:
> set max_parallel_workers_per_gather = 0;
>
> HashAggregate (cost=1676432.13..1676432.16 rows=3 width=15) (actual time=19908.343..19908.345 rows=5 loops=1)
> I/O Timings: read=532369.898
> Execution Time: 19908.383 ms
> HashAggregate (cost=1390580.70..1390580.72 rows=2 width=15) (actual time=30369.758..30369.761 rows=5 loops=1)
> I/O Timings: read=6440851.540
> Execution Time: 30369.796 ms
> Still taking 10X more I/O to read the smaller table. Very odd.
If I'm not wrong, it's even worse than that ?
It takes 20 or 30sec to run the query - but it says the associated I/O times
are ~500sec or ~6000sec ?
What architecture and OS/version are you running ?
How did you install postgres? From a package or compiled from source ?
It might be interesting to know the output from something like this command,
depending on whether and where the headers like pg_config_x86_64.h are installed.
grep -r HAVE_CLOCK_GETTIME /usr/pgsql-13/include
--
Justin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: pryzby@telsasoft.com, larsavatar@gmail.com, tgl@sss.pgh.pa.us, pgsql-performance@lists.postgresql.org
Subject: Re: Query is slower with a large proportion of NULLs in several columns
In-Reply-To: <20211221045138.GZ17618@telsasoft.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox