Subject [firebird-support] Re: derived table within EXISTS (was: Different performance Superserver VS. Embeded ?)
Author Svein Erling Tysvaer
Hi again, Dany!

I downloaded this 140 MB version, Fb 2.1 RC1 and IB_SQL (from
www.ibobjects.com). Then I tried the sql I suggested, your original
query and Seans suggestion. IB_SQL doesn't have a timer function (as far
as I know), but from looking at the computer, I'd say it took about 3
seconds to return the first row, and additionally 4 seconds to get the
remaining 154 rows (well, it may be 10 seconds rather than 7, but far
from 10 minutes). All three statements used about the same time, and I
tried two of the statements (all but Seans) just after restarting the
Firebird service (I've never cared about any Firebird cache, just guess
that stop and start the service ought to clear it?).

Hence, I find that although the query isn't instant, it isn't all too
slow running locally on my Windows XP (I think) computer, and I guess
there is something particular to your situation that isn't related to
the database or Firebird 2.1 itself. I have no idea why such a query
needs 10 minutes for you to run, whereas I run it in a fraction of that
time.

Although this answer doesn't answer your problem, I hope it helps
knowing that I doubt Firebird 2.1 itself is the cause for your problem
(I've never heard of any statement that e.g. runs reasonably quick on
Windows, but is painfully slow on Linux).

Good luck with further examinations,
Set

danyschaer wrote:
> Hi All
>
> I uploaded http://www.lex-doctor.com/daniel/danydata.zip (140 MB
> aporx); into it there is my full test database.
>
> For this test, I am using the last Superserver Firebird 2.1 release
> candidate we can find on firebirdsql.org and the last FrameRobin
> version.
>
> Sean posted one differnt sintaxis approach that works very well, but I
> think I answered to him "why" I am using this "where exists" sintaxis.
>
> Many thanx to all of you !!!!
>
> Dany