pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Benjamin Arai <me@benjaminarai.com>
To: pgsql-performance@postgresql.org
To: pgsql-general@postgresql.org
Subject: Parrallel query execution for UNION ALL Queries
Date: Wed, 18 Jul 2007 09:14:35 -0700 (PDT)
Message-ID: <39160.131.107.65.118.1184775275.squirrel@webmail.benjaminarai.com> (raw)

Hi,

If I have a query such as:

SELECT * FROM (SELECT * FROM A) UNION ALL (SELECT * FROM B) WHERE
blah='food';

Assuming the table A and B both have the same attributes and the data
between the table is not partitioned in any special way, does Postgresql
execute WHERE blah="food" on both table simultaiously or what?  If not, is
there a way to execute the query on both in parrallel then aggregate the
results?

To give some context, I have a very large amount of new data being loaded
each week.  Currently I am partitioning the data into a new table every
month which is working great from a indexing standpoint.  But I want to
parrallelize searches if possible to reduce the perofrmance loss of having
multiple tables.

Benjamin




view thread (7+ messages)  latest in thread

Message-ID: <39160.131.107.65.118.1184775275.squirrel@webmail.benjaminarai.com>
Permalink:  ../39160.131.107.65.118.1184775275.squirrel@webmail.benjaminarai.com/
Also on:    postgresql.org/message-id/39160.131.107.65.118.1184775275.squirrel@webmail.benjaminarai.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-performance@postgresql.org
  Cc: me@benjaminarai.com, pgsql-general@postgresql.org
  Subject: Re: Parrallel query execution for UNION ALL Queries
  In-Reply-To: <39160.131.107.65.118.1184775275.squirrel@webmail.benjaminarai.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