X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1356D3A4547 for ; Thu, 6 Jan 2005 16:58:34 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17815-04 for ; Thu, 6 Jan 2005 16:58:04 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id C04043A45A8 for ; Thu, 6 Jan 2005 16:58:04 +0000 (GMT) Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6873270; Thu, 06 Jan 2005 08:59:42 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org, Miles Keaton Subject: Re: Benchmark two separate SELECTs versus one LEFT JOIN Date: Thu, 6 Jan 2005 08:57:56 -0800 User-Agent: KMail/1.6.2 References: <59b2d39b0501051831643e90f2@mail.gmail.com> In-Reply-To: <59b2d39b0501051831643e90f2@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200501060857.56812.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/67 X-Sequence-Number: 9757 Miles, > I only have a laptop here so I can't really benchmark properly. > I'm hoping maybe someone else has, or just knows which would be faster > under high traffic/quantity. Well, it's really a difference between round-trip time vs. the time required to compute the join. If your database is setup correctly, the 2nd should be faster. However, it should be very easy to test .... -- Josh Berkus Aglio Database Solutions San Francisco