Re: Query Permormance improvement: URGENT
Posted in 2004
> But in the cases when the optimizer plan is _nonsense_ (statistics et all stuff done) you just have to split a long query to see what the problem is... Absolutely not. You can force the order you think it should be choosing (usually to eliminate the most rows as early as possible) with optimiser directives. This will then make it very obvious if, say, you've got an index missing / wrong, you can take the appropriate action and then it should get the order right without needing directives. If it still gets it wrong then UPDATE STATISTICS MEDIUM / HIGH on the join and filter columns is always a good bet. It can also make a difference whether you have FIRST_ROWS or ALL_ROWS optimisation (and some versions of 9.x don't handle these right). If all else fails you could always just leave the directives on. And then if you're talking DS queries (which we're not here) you may need to turn everything you've learned about indexing on its head ... > So, some times, to me, it is useful to split querys... in fact most of the times I've done it I got performance improvements, although maybe I'am missing something. If you are getting the best performance by splitting queries then almost certainly yes. Andy