Subject | Re: Why does this query take forever in FB?!?! |
---|---|
Author | rjschappe |
Post date | 2004-05-06T17:51:13Z |
>Raymond, let me answer in descending order.Alexander,
>Why. Because FB serves IN (Select ...) scanning
>table in main select and performing subquery.
>Seemingly, MS SQL perform subselect once and perhaps
>use indices on main table if it is possible.
>
>select LO.Color, LO.Width, LO.LamLength
>from LamOrder LO join OrderItem OI on LO.CustOrder=OI.CustOrder
> join LamColor LC on OI.Color = LC.ID
>where (OI.ItemFlags=1 or OI.ItemFlags=3)
> and LC.LamMaker=4
Thanks for the quick response!!! I am still getting used to the way
FB does things... it is a journey, but I am sure it will be worth it!
I added a group by, and order by and still your query came back in
_less_ than a second!!!! :)
Thanks again for the help,
--Raymond