pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Indexing UNIONs
Date: Mon, 15 Jul 2002 17:31:24 -0700
Message-ID: <200207151731.24567.josh@agliodbs.com> (raw)
In-Reply-To: <20020715130911.V41271-100000@megazone23.bigpanda.com>
References: <20020715130911.V41271-100000@megazone23.bigpanda.com>

Stephan,

> We had a discussion recently on -general about this.  Right now the
> planner won't push the conditions down into the arms of the union because
> noone's been sure under what conditions the optimization is safe.

So, if performance is horrible with the view, I should use a dummy table to 
hold the Unioned data and index that instead?

I can understand the difficultyof optimization.  However, the example I 
supplied is the simplest of unions, and the two Seq Scans do seem to be 
proceeding against each table seperately.   I think for very simple Unions 
(i.e. no grouping, no filtering within subqueries, etc.) that index usage 
would be reasonable to implement.

However, I can't program it myself, so I'll have to just stick to whining and 
pitiful pleading <blink puppy-dog eyes, sniffle>

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




view thread (13+ messages)  latest in thread

Message-ID: <200207151731.24567.josh@agliodbs.com>
Permalink:  ../200207151731.24567.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200207151731.24567.josh@agliodbs.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: josh@agliodbs.com, sszabo@megazone23.bigpanda.com
  Subject: Re: Indexing UNIONs
  In-Reply-To: <200207151731.24567.josh@agliodbs.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