Re: Have I b0rked something? Slow comparisons on "where x in (...)" - Mailing list pgsql-general

From Stephen Harris
Subject Re: Have I b0rked something? Slow comparisons on "where x in (...)"
Date
Msg-id 20070503135712.GA31220@pugwash.spuddy.org
Whole thread Raw
In response to Re: Have I b0rked something? Slow comparisons on "where x in (...)"  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Have I b0rked something? Slow comparisons on "where x in (...)"
List pgsql-general
On Wed, May 02, 2007 at 05:59:49PM -0400, Tom Lane wrote:
> Stephen Harris <lists@spuddy.org> writes:

> >   "select stuff from table where index_key in (" .
> >       join(",",keys %hash) . ") AND non_index_row in ('xyz','abc','def')

> In what, a seq scan?

Yeah, if the number of comparisons exceeds 156 then it switched from
index scan to sequential scan.

> time, I can see where the time might get eaten up.  Where is the
> index_key column in the tuples, exactly?

First column.

--

rgds
Stephen

pgsql-general by date:

Previous
From: Paul Tilles
Date:
Subject: psql access of user's environmental variables
Next
From: Richard Broersma Jr
Date:
Subject: Re: Update violating constraint