Re: NULLS LAST performance - Mailing list pgsql-performance

From Robert Haas
Subject Re: NULLS LAST performance
Date
Msg-id AANLkTikqMnwmbQ+Hm5c3O4c9NzjbKJUpAx_1ObutbwGE@mail.gmail.com
Whole thread Raw
In response to Re: NULLS LAST performance  (Jim Nasby <jim@nasby.net>)
Responses Re: NULLS LAST performance  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-performance
On Wed, Mar 9, 2011 at 6:01 PM, Jim Nasby <jim@nasby.net> wrote:
> Unfortunately, I don't think the planner actually has that level of knowledge.

Actually, I don't think it would be that hard to teach the planner
about that special case...

> A more reasonable fix might be to teach the executor that it can do 2 scans of the index: one to get non-null data
anda second to get null data. I don't know if the use case is prevalent enough to warrant the extra code though. 

That would probably be harder, but useful.  I thought about working on
it before but got sidetracked onto other things.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-performance by date:

Previous
From: sverhagen
Date:
Subject: Re: Performance trouble finding records through related records
Next
From: fork
Date:
Subject: Tuning massive UPDATES and GROUP BY's?