Re: Indexing UNIONs

From: Richard Huxton <dev(at)archonet(dot)com>
To: josh(at)agliodbs(dot)com, Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Indexing UNIONs
Date: 2002-07-17 09:29:16
Message-ID: 200207171029.17572.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tuesday 16 Jul 2002 11:42 pm, Josh Berkus wrote:
> OK, I guess I'll have to get into detail:
>
[detail on cases and trial-groups]
>
> Thus, I need to relate (in views and queries) each Event to the Union of
> Cases and Trial Groups. I just can't figure out how to do so without the
> database discarding the indexes on Cases in the process and things slowing
> to a crawl.

Well, if there was some commonality between cases and trial groups you'd have
noticed it. How about two event tables, one for each type of schedulable
event and unioning those?

Of course, that's just shuffling the complexity around since you'll need a
view with the relevant rewrites and possibly some way of detecting scheduling
conflicts?

- Richard Huxton

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dirk Lutzebaeck 2002-07-17 10:06:57 How to find out if an index is unique?
Previous Message Karel Zak 2002-07-17 08:27:48 Re: datatype matrix (was: Re: Sorry..)