Subject [ib-support] Re: 3rd attempt: HELP needed for optimization
Author Svein Erling Tysv?r
Hi again Mirco!

Today I finally got some time to look at your SP and what I see is a query
more complex than any query I've ever written (I got a bit lost with your
joins inside a left outer join). Have you tried splitting the query into two
queries? I.e. have an outer FOR SELECT where you select most of the fields
and then a separate FOR SELECT query inside it for the SampleGroup etc?

Just guessing really, but it ought to give you some idea about which half of
what you are trying to do that is time consuming as well as making it easier
for yourself and the rest of us to grasp what is going on (if I were a
Firebird, I'd probably given up even reading the plan!).

If you've not solved your problem already I hope this will help,
Set