Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id A6258475872 for ; Mon, 29 Apr 2002 00:44:50 -0400 (EDT) Received: from [63.195.55.98] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1387383 for ; Sun, 28 Apr 2002 21:44:55 -0700 From: "Josh Berkus" Subject: IN, EXISTS or ANY? To: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Sun, 28 Apr 2002 21:44:55 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200204/348 X-Sequence-Number: 7612 Folks, I was wondering if there is any difference in execution speed for the following three statements: WHERE case_id IN (SELECT case_id FROM case_clients WHERE matter_no = '123.122342'); or: WHERE case_id = ANY (SELECT case_id FROM case_clients WHERE matter_no = '123.122342'); or WHERE EXISTS ( SELECT case_id FROM case_clients WHERE matter_no = '123.122342' AND case_id = cases.case_id); ... or does the parser handle all three exactly the same way? -Josh Berkus