🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #961

INDEX on UNION VIEW

#961
From: Russella
Date: Thu, 29 Mar 2007 06:39
11 lines
1340 bytes
I've got a complex VIEW which is made up of 4 queries combined using UNION.

Separately, each of the queries uses the appropriate index, however when I 
issue a SELECT on the VIEW and pass parameters using a WHERE clause, I can't 
get it to use the right index.

Is there a way around this, aside from using a stored procedure, in which a 
WHERE clause can be used for each query ahead of the UNION clause?

Thanks in advance
Russell.
Technical Details
Message-ID: <460b5f3b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,ee792710f953efac,start
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Russella" <russella@tryware.com.au>
Newsgroups: borland.public.interbase.sql
Subject: INDEX on UNION VIEW
Date: Thu, 29 Mar 2007 16:09:44 +0930
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 58.108.60.201
Message-ID: <460b5f3b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1175150395 58.108.60.201 (28 Mar 2007 23:39:55 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail