Re: BUG #18477: A specific SQL query with "ORDER BY ... NULLS FIRST" is performing poorly if an ordering column is n - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #18477: A specific SQL query with "ORDER BY ... NULLS FIRST" is performing poorly if an ordering column is n
Date
Msg-id 202405241003.uxtpwvtwcods@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #18477: A specific SQL query with "ORDER BY ... NULLS FIRST" is performing poorly if an ordering column is n  (Alexander Alexander <alexander.berezin3000@gmail.com>)
Responses Re: BUG #18477: A specific SQL query with "ORDER BY ... NULLS FIRST" is performing poorly if an ordering column is n
List pgsql-bugs
On 2024-May-24, Alexander Alexander wrote:

> Additionally, as you mentioned, the default index is created with NULLS
> LAST, but in this case, the column is non-nullable, making NULLS LAST
> unnecessary as well.

But the NOT NULL constraint could be dropped at any minute, so the
system needs to know where NULLs would go if that were to happen.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Los dioses no protegen a los insensatos.  Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)



pgsql-bugs by date:

Previous
From: Alexander Alexander
Date:
Subject: Re: BUG #18477: A specific SQL query with "ORDER BY ... NULLS FIRST" is performing poorly if an ordering column is n
Next
From: "Machytka, Josef"
Date:
Subject: Confusing numbers in actual time in explain analyze output of recursive query when jit is used