Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: performance strategies for many joins
Steve Wicklund wrote:
> hello all;
> I have utility being written that must join seven table in order to
> produce a report-style file out on oracle 8. One table is joined with
> seven others to bring in a siginifact amount of conected data such as
> the customers phone, address, etc. Also, the 'main' table as it were,
> must be Unioned with nearly identicle table that contains older
> records. My question is this. Are there any 'general' strategies for
> improving the performance of the query? I am not looking for someone
> to write the sql again, just some overall concepts that can be adhered
> to that tend to help with speed of execution. The design of the schema
> is not up for change, so that is not an option. All of the columns
> involved in the join have indexes. Just looking for a few 10,000 foot
> level concepts for making a query smarter/faster.
>
> Thanks!
analyze
Analyze
ANALYZE
IOW, make sure everytime you run the report that the stats are updated. Then
the optimizer will have the best chance to find a good query path.
(This assumes indices and keys are set up properly.)
-- Ed Prochak running: http://www.faqs.org/faqs/running-faq/ family: http://web.magicinterface.com/~collins -- "Two roads diverged in a wood and I I took the one less travelled by and that has made all the difference." robert frostReceived on Fri Feb 07 2003 - 11:43:23 CST