Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question about SQL syntax for joins

Re: Newbie question about SQL syntax for joins

From: Noodles <noodles_at_aol.com>
Date: 1997/11/23
Message-ID: <19971123125301.HAA11597@ladder02.news.aol.com>#1/1

Len,

From the added search criteria in the where clause, ( city.name = 'WARSAW'), my initial gut reaction is that your SQL is fine; it just needs to be tuned. Have you tried running your SQL through EXPLAIN and TKPROF ? Also, what optimizer mode is your database running in ?

If you haven't analyzed your indexes to get good stats for the optimizer to use ( assuming you're not using rule-based optimization), then obviously the optimizer is making some very bad decisions on how to parse and execute your SQL. You might want to look into the documentation regarding SQL Hints to give Oracle some hints on how to run your SQL. Remember, only you know your data frequency, cardinality, etc.

For Example, sometimes just switching the table order can change which table is used for driving the where clause parameters. In the past I've moved the table order and the where clause parameter order around with the SQL Timer feature on and you'd be surprized what different performance effects you get.

' hope I've given you some ideas.

Cliff Received on Sun Nov 23 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US