Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3F8E2634821 for ; Thu, 20 Aug 2009 19:03:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 90937-07 for ; Thu, 20 Aug 2009 22:03:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mail.postgresql.org (Postfix) with ESMTP id 7182F633722 for ; Thu, 20 Aug 2009 19:03:17 -0300 (ADT) Received: by qw-out-2122.google.com with SMTP id 3so144050qwe.61 for ; Thu, 20 Aug 2009 15:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Fgliy/BEVNorN/jR3VXmWczpKUpSyxGl1zlWrak5afQ=; b=vCW28r8ackSUArcGj8nWCUXU0MHl5OLmiHDpPu0hUXimJ1NJBk1Ev1ygjEtpL7fWlR KJurBmTpjWKvkf1ahdLIl4AhseCFiO1Rf74da8GLJLkIbNKXO1q8khsUG/6DDREYTdGA OcKK42SbkIwBYeaJgRT4RiCZjSXkuzkX1x5FQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=dZVHWR1x/qhgJVk4673zeWY7GN6Iu+kRdEXG8WbMc4be2HVRuzf5rg7zJ9FNP6PrQJ r4jMiYftBugrVZwbSWcHnGAQbGPHsmIAWl+y1Liz/xhVudCCpNbkl0HpA4EP+xQrerw7 KnK0MQOIMWl+CoNhKiV5ASTOPR/0RqmPattLE= MIME-Version: 1.0 Received: by 10.229.9.130 with SMTP id l2mr64583qcl.41.1250805796020; Thu, 20 Aug 2009 15:03:16 -0700 (PDT) In-Reply-To: References: <33b743250908201332k5e7b0e3fga71a1ec6b44f302a@mail.gmail.com> <4A8DB4D7.6030102@noaa.gov> <33b743250908201416h3ec8b61cp4976ab540c4e7cee@mail.gmail.com> Date: Thu, 20 Aug 2009 15:03:15 -0700 Message-ID: <33b743250908201503r10686639s17adc292565c5ee7@mail.gmail.com> Subject: Re: Rewrite without correlated subqueries From: bricklen To: Scott Marlowe Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=00163683269c27a229047199eb96 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200908/118 X-Sequence-Number: 33027 --00163683269c27a229047199eb96 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Thu, Aug 20, 2009 at 2:59 PM, Scott Marlowe wrote: > On Thu, Aug 20, 2009 at 3:16 PM, bricklen wrote: > > Interesting idea. Preferably this operation could be done in straight SQL > in > > a single transaction, to fit in with the way our application works, but > if > > that's not possible I may need to go the temporary table route. > > Temp tables can be included in a transaction, and they're not visible > to other connections. > Yeah I know, but I was thinking more of replacing this query with vanilla SQL. Maybe that's just not be feasible. --00163683269c27a229047199eb96 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, Aug 20, 2009 at 2:59 PM, Scott Marlowe <= span dir=3D"ltr"><scott.marlo= we@gmail.com> wrote:
On Thu, Aug 20, 2009 at 3:16 PM, bricklen<bricklen@gmail.com> wrote:
> Interesting idea. Preferably this operation could be done in straight = SQL in
> a single transaction, to fit in with the way our application works, bu= t if
> that's not possible I may need to go the temporary table route.
Temp tables can be included in a transaction, and they're not vis= ible
to other connections.

Yeah I know, but I was thinking more of replacing th= is query with vanilla SQL. Maybe that's just not be feasible.

--00163683269c27a229047199eb96--