Re: many 'OR' in WHERE-condition - Mailing list pgsql-sql

From Richard Huxton
Subject Re: many 'OR' in WHERE-condition
Date
Msg-id 46289E10.9060302@archonet.com
Whole thread Raw
In response to many 'OR' in WHERE-condition  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Responses Re: many 'OR' in WHERE-condition
List pgsql-sql
A. Kretschmer wrote:
> in a SELECT with a condition 'WHERE foo IN (1,2,3,4,...)' with a large
...
> But if the list increase the planner choose an seq-scan. The amount of
> values in the list is about 200 and the table has about 250.000 rows.
> 
> How can we avoid the seq-scan?

Are you sure you'd want to? What plan have you found to be faster with 
200 tests?

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Dmitry Turin
Date:
Subject: Re: We all are looped on Internet: request + transport = invariant
Next
From: Richard Huxton
Date:
Subject: Re: We all are looped on Internet: request + transport = invariant