Article View: borland.public.interbase.sql
Article #517Re: Using EXISTS in views crashed IB (6.0)??
From: Arno Brinkman
Date: Wed, 14 Nov 2007 09:08
Date: Wed, 14 Nov 2007 09:08
41 lines
2266 bytes
2266 bytes
Hi Arjan,
> We have an existing installation of IB Server 6 which I was updating to incorporate some new views. When testing I ran
> across the following problem.
> I have a view, which results depend on the existing of matching data in another view, like this:
...
I'm not sure about the reason of the crash, but if it's due the PLAN try to use aliasses and see if that helps
(workaround of course).
SELECT
l.LocatieOID, l.Verwijderd, l.Naam, l.Tellergebruik,
l.Tellersaan, k.KlantOID, k.Naam, a.Plaats
FROM
Locaties l
JOIN Klanten k ON (l.KlantOID = k.KlantOID)
JOIN Adressen a ON (l.AdresOID = a.AdresOID)
WHERE
(EXISTS (SELECT t.TijdelijkOID FROM Tijdelijk t
WHERE t.LocatieOID = l.LocatieOID))
OR
(EXISTS (SELECT vla.LOCATIEOID FROM VIEWLOCAUTMCOUNT vla
WHERE vla.LocatieOID = l.LocatieOID))
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info
Firebird open source database with many powerful SQL features:
http://www.firebirdsql.org
http://www.firebirdsql.info
General database developer support:
http://www.databasedevelopmentforum.com
Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com
Technical Details
Message-ID:
<473abb2c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<473a11f4@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,2745675ecdb62401 X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Arno Brinkman" <bnewsgroups @ REMOVE_ME abvisie.nl> Newsgroups: borland.public.interbase.sql References: <473a11f4@newsgroups.borland.com> Subject: Re: Using EXISTS in views crashed IB (6.0)?? Date: Wed, 14 Nov 2007 10:08:58 +0100 Lines: 47 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 84.81.40.49 Message-ID: <473abb2c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1195031340 84.81.40.49 (14 Nov 2007 01:09:00 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail