Re: slow IN() clause for many cases - Mailing list pgsql-hackers

From Tom Lane
Subject Re: slow IN() clause for many cases
Date
Msg-id 8647.1129481852@sss.pgh.pa.us
Whole thread Raw
In response to Re: slow IN() clause for many cases  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: slow IN() clause for many cases
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Sun, Oct 16, 2005 at 12:03:33PM -0400, Greg Stark wrote:
>> That's true. That's why I was wondering more about cases where the client end
>> was going to read all the records until it found the record it's looking for
>> or found enough records for its purposes.

> I would argue that the client should simply ask for what it wants
> rather than filtering on the client end. Then PostgreSQL has the info
> to optimise appropriately.

Certainly, if you do not supply a LIMIT, there is no justification
at all for expecting the planner to prefer fast-start over
minimum-total-cost.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: Advice needed concerning Win32 signals
Next
From: Thomas Hallgren
Date:
Subject: Re: Advice needed concerning Win32 signals