Torben, if you are able to do this in a graphical calc view, I think the Calc engine should be able to help with the optimization, otherwise, in plain sqlScript you may want to break down the complex query into multiple simpler sub queries to take advantage of parallel processing. Keep in mind to filter first and later aggregate (if any is needed), for example: q1 = select .. from table_or_view where condition = value(s); q2 = select .. from table2_or_view2 where condition = value(s); . . output = select (columns) // column(s) from table(s) from :q1, :q2 // do any joins where additional_condition = additional_values not a straight answer but better than just saying look at your plan analyzer :) one thing to know though is : what is your goal? execution time, number of records, etc?
↧