Re: Indexes on NULL's and order by ... limit N queries - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Indexes on NULL's and order by ... limit N queries
Date
Msg-id 20081201204144.GL4459@alvh.no-ip.org
Whole thread Raw
In response to Re: Indexes on NULL's and order by ... limit N queries  (Maxim Boguk <mboguk@masterhost.ru>)
Responses Re: Indexes on NULL's and order by ... limit N queries  (Maxim Boguk <mboguk@masterhost.ru>)
List pgsql-general
Maxim Boguk wrote:
> Sorry with all my respect to you, you look like wrong.

The difference is that the plan with -1 does not need to sort the
output, because it comes sorted out of the index; so the execution can
be stopped as soon as 5 tuples have come out.  With NULL, that can't be
done.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: Maxim Boguk
Date:
Subject: Re: Indexes on NULL's and order by ... limit N queries
Next
From: Tom Lane
Date:
Subject: Re: Trigger before delete does fire before, but delete doesn't not happen