join vs. IN statement

From: Jodi Kanter <jkanter(at)virginia(dot)edu>
To: Postgres Admin List <pgsql-admin(at)postgresql(dot)org>
Subject: join vs. IN statement
Date: 2002-03-27 15:45:30
Message-ID: 005501c1d5a6$6c9a6630$de138f80@virginia.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

We are currently trying to determine if their is a performance difference with postgres in using an IN statement in the where clause vs. using a join between tables.
Is there any published documentation or someone with personal experience that can answer this question? We are adding sessioning to our web interface and plan to append security info to the queries run from the interface.

I can add something like: ....... AND WHERE user IN (group1, group2)

or I can do something like ....... SELECT data FROM tables WHERE group_ID(of one table) = group_ID(of another table).

Any thoughts?
thanks
Jodi Kanter

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter(at)virginia(dot)edu

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Joe Conway 2002-03-27 16:36:15 Re: join vs. IN statement
Previous Message Karel Zak 2002-03-27 11:07:06 Re: timestamp in 7.2