INTERSECT / where id IN (etc..)

From: "James Cooper" <jim(at)luckydigital(dot)com>
To: "sql" <pgsql-sql(at)postgresql(dot)org>
Subject: INTERSECT / where id IN (etc..)
Date: 2003-03-06 00:54:50
Message-ID: 003701c2e37a$fe0bb2d0$c900a8c0@jax
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Greetings.

I was wondering if somone out there could shed some light on a query performance issie I have.
I have a large lookup table that I query with nested selects to gain the INTERSECT result from.

the bigger this table gets the slower the performance.

1. is creating a temp table and only intersecting from this a good idea?
2. does having a where clause in your select before your nested intersects change the amount of work the query

i.e. select person_id from person where person_id < 5000 And person_id IN
as opposed to
select person_id from person where person_id IN(etc)

thoughts?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bjarke Dahl Ebert 2003-03-06 01:44:47 Re: problematic query (for me ;-)
Previous Message Tomasz Myrta 2003-03-05 23:39:53 Re: INTERSECT / where id IN (etc..)