Re: Have I b0rked something? Slow comparisons on "where x in (...)"

From: Stephen Harris <lists(at)spuddy(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Have I b0rked something? Slow comparisons on "where x in (...)"
Date: 2007-05-03 13:57:12
Message-ID: 20070503135712.GA31220@pugwash.spuddy.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 02, 2007 at 05:59:49PM -0400, Tom Lane wrote:
> Stephen Harris <lists(at)spuddy(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2007-05-03 14:00:25 Re: Update violating constraint
Previous Message Dan Weber 2007-05-03 13:39:40 Re: forcing use of a specific (expression) index?