Re: Query is slower with a large proportion of NULLs in several columns

From: Lars Bergeson <larsavatar(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Query is slower with a large proportion of NULLs in several columns
Date: 2021-12-21 22:53:20
Message-ID: CAK66RGZ+3eztwfRzgN7ckc-orOzxyd5G5bka=n6RtB5rWm7ZdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Justin,

Thanks for your continued interest.

I'm running PostgreSQL under AWS Aurora, and I didn't set it up or install
it, so I'm not sure about the OS version.

I can't run the grep command since I don't know how to get down to the
command line on the actual box running Aurora. I just connect to PostgreSQL
from either my desktop or an EC2 Linux instance.

SQL I entered was:
set max_parallel_workers_per_gather = 0;
explain (analyze, buffers, settings)
select roys_creation_user, count(*)
from eu.royalty_with_null
group by roys_creation_user;

The output is shown earlier in this thread.

I have no idea why I have IO timings but not buffers hit/read.

On Tue, Dec 21, 2021 at 1:13 PM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:

> On Tue, Dec 21, 2021 at 12:33:06AM -0500, Tom Lane wrote:
> > So now we have a real mystery about what is happening on Lars'
> > system. Those numbers can't be right.
>
> I realized Lars said it was x86_64/Linux, but I'm hoping to hear back with
> more
> details:
>
> What OS version?
> Is it a VM of some type ?
> How did you install postgres? From a package or compiled from source?
> grep -r HAVE_CLOCK_GETTIME /usr/pgsql-13/include
> Send the exact command and output you used to run the query?
> Why does your explain output have IO timing but not Buffers: hit/read ?
>
> --
> Justin
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2021-12-21 23:07:52 Re: Query is slower with a large proportion of NULLs in several columns
Previous Message Justin Pryzby 2021-12-21 21:13:37 Re: Query is slower with a large proportion of NULLs in several columns