Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query Optimization question
vk02720_at_my-deja.com wrote:
>
> What is a good way to analyze slow running queries ?
> Does the order of table names after 'from' or clauses after 'where'
> matter ? If so are there anu rules of thumb to for from and where ?
>
> DBMS : Oracel 7.3.4 / 8.1.6
> OS: AIX 4.2.x 4.3.x
>
> Any answers or pointers to info on the web appreciated.
>
> TIA
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
The answer as always is... depends
If you are using rule based optimiser, the query is evaluated based on its syntax - thus table order etc is important. If you are using cost based optimiser, then Oracle tries to make an informed decision about the best way of going about things...
The ANALYZE command is used to keep these stats up to date.
HTH
-- =========================================== Connor McDonald http://www.oracledba.co.uk We are born naked, wet and hungry...then things get worseReceived on Tue Aug 22 2000 - 07:38:49 CDT