Subject Re: [firebird-support] Simple SELECT statement causes long running query
Author Claus Heeg
more ... exact ... internally you do a cartesian product to find the max
of 100s million rows
you will have to give a where clause and join by a reference of both
tables.
... where t1.id? t2.id


Claus


Christian G├╝tter schrieb:

>Hi,
>
>running the following query against Firebird 1.50
>causes the server to compute for a very long (infinite?)
>time:
>
>SELECT MAX (T1.ID),
> MAX (T2.ID)
> FROM Table1 T1, Table2 T2
>
>The two ID Fields are PKs, both table contain approximately
>25 K records.
>
>I have never used such a query before, so I am wondering
>if it is valid or invalid and what is causing Firebird to
>work so long.
>
>
>Thanks in advance,
>
>
>Christian
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>