Parrallel query execution for UNION ALL Queries

From: "Benjamin Arai" <me(at)benjaminarai(dot)com>
To: pgsql-performance(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Parrallel query execution for UNION ALL Queries
Date: 2007-07-18 16:14:35
Message-ID: 39160.131.107.65.118.1184775275.squirrel@webmail.benjaminarai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-07-18 16:21:49 Re: Again about varchar()
Previous Message 李彦 Ian Li 2007-07-18 16:07:39 Again about varchar()

Browse pgsql-performance by date

  From Date Subject
Next Message Jonah H. Harris 2007-07-18 16:21:49 Re: [PERFORM] Parrallel query execution for UNION ALL Queries
Previous Message Adam Tauno Williams 2007-07-18 15:43:42 Re: How to use a trigger to write rows to a remote server