Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by postgresql.org (Postfix) with ESMTP id BA879475A6C for ; Wed, 17 Jul 2002 05:30:14 -0400 (EDT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 17Ul8K-000FZz-0W; Wed, 17 Jul 2002 10:30:09 +0100 Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 9B24911E9F; Wed, 17 Jul 2002 10:29:19 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: josh@agliodbs.com, Bruno Wolff III Subject: Re: Indexing UNIONs Date: Wed, 17 Jul 2002 10:29:16 +0100 User-Agent: KMail/1.4.1 Cc: pgsql-sql@postgresql.org References: <20020716114553.GB29323@wolff.to> <20020716192006.GC32419@wolff.to> <200207161542.23433.josh@agliodbs.com> In-Reply-To: <200207161542.23433.josh@agliodbs.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207171029.17572.dev@archonet.com> X-Archive-Number: 200207/260 X-Sequence-Number: 8638 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 ha= ve=20 noticed it. How about two event tables, one for each type of schedulable=20 event and unioning those? Of course, that's just shuffling the complexity around since you'll need a= =20 view with the relevant rewrites and possibly some way of detecting scheduli= ng=20 conflicts? - Richard Huxton