From: Laurenz Albe <laurenz.albe@cybertec.at>
To: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Alexander Alexander <alexander.berezin3000@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18477: A specific SQL query with "ORDER BY ... NULLS FIRST" is performing poorly if an ordering column is n
Date: Thu, 06 Jun 2024 10:10:53 +0200
Message-ID: <8807644dd252993a498b4ec77e6ecbc46808b142.camel@cybertec.at> (raw)
In-Reply-To: <CAApHDvqdSj8Z1tWMZRrs15a9vz6XGiDhEGqr3rEWFEthWT-tvQ@mail.gmail.com>
References: <CA+AiShyGQoZfS6NvCfZ6xz1kTm_Sei3DtreXkNhRr5yd8LacVQ@mail.gmail.com>
<202405241003.uxtpwvtwcods@alvherre.pgsql>
<CAApHDvoUQqKy5qoXBBL3NReEiigWJDh54EQuyT8Ha4rO=htOjA@mail.gmail.com>
<951329.1717645689@sss.pgh.pa.us>
<CAApHDvqdSj8Z1tWMZRrs15a9vz6XGiDhEGqr3rEWFEthWT-tvQ@mail.gmail.com>
On Thu, 2024-06-06 at 17:04 +1200, David Rowley wrote:
> On Thu, 6 Jun 2024 at 15:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > AFAICS the problem is purely self-inflicted damage: why is the user
> > specifying NULLS FIRST if he knows the column is not-null?
>
> If the user has some genuine reason for creating a NULLS FIRST index
> for some other query, then it might be nice if we were able to use
> that index for Merge Joins instead of them having to create another
> index to speed up the join query.
I cannot imagine a genuine reason for creating a NULLS FIRST index
on a NOT NULL column, but perhaps I am too narrow-minded.
Yours,
Laurenz Albe
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-bugs@postgresql.org
Cc: laurenz.albe@cybertec.at, dgrowleyml@gmail.com, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, alexander.berezin3000@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18477: A specific SQL query with "ORDER BY ... NULLS FIRST" is performing poorly if an ordering column is n
In-Reply-To: <8807644dd252993a498b4ec77e6ecbc46808b142.camel@cybertec.at>
* 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