pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Igor Neyman <ineyman@perceptron.com>
Cc: Chris.Ellis@shropshire.gov.uk
Cc: neilstylz@yahoo.com
Cc: pgsql-general@postgresql.org
Subject: Re: combine SQL SELECT statements into one
Date: Mon, 1 Feb 2010 13:25:41 -0700
Message-ID: <dcc563d11002011225p80b1af7ta400155584e1f1fb@mail.gmail.com> (raw)
In-Reply-To: <F4C27E77F7A33E4CA98C19A9DC6722A2057D815E@EXCHANGE.corp.perceptron.com>
References: <995516.81823.qm@web113717.mail.gq1.yahoo.com>
	<OF1DFE3081.6BFBD791-ON802576BD.0031A099-802576BD.00327569@shropshire.gov.uk>
	<F4C27E77F7A33E4CA98C19A9DC6722A2057D815E@EXCHANGE.corp.perceptron.com>

On Mon, Feb 1, 2010 at 12:09 PM, Igor Neyman <ineyman@perceptron.com> wrote:
> Original poster asked for the sql that will touch inventory table only
> once.
>
> Your statement (with 3 subqueries) will do it 3 times.

I'm pretty sure that starting with 8.3 the engine will collapse all
those into one seq scan internally.



view thread (11+ messages)  latest in thread

Message-ID: <dcc563d11002011225p80b1af7ta400155584e1f1fb@mail.gmail.com>
Permalink:  ../dcc563d11002011225p80b1af7ta400155584e1f1fb@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d11002011225p80b1af7ta400155584e1f1fb@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: scott.marlowe@gmail.com, ineyman@perceptron.com, Chris.Ellis@shropshire.gov.uk, neilstylz@yahoo.com, pgsql-general@postgresql.org
  Subject: Re: combine SQL SELECT statements into one
  In-Reply-To: <dcc563d11002011225p80b1af7ta400155584e1f1fb@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox