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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL performance question

Re: SQL performance question

From: <sybrandb_at_my-deja.com>
Date: Mon, 25 Sep 2000 19:06:56 GMT
Message-ID: <8qo7nu$70c$1@nnrp1.deja.com>

In article <8qo711$5tv$1_at_nnrp1.deja.com>,   terry_stjean_at_my-deja.com wrote:
> I have an SQL select statement which I would like to see if I can get
> to run faster.
> I have a transaction table with 15 million records joined to 3 master
> tables. One has 1500 records, one has 11000 records and the other
 about
> 15 records.
> Besides joining these tables on the where clause, I am also selecting
> certain records.
> Any suggestions about optimizing. Does the order on the from or where
> clause matter.
>
> Terry
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Not too much clues, and as performance tuning is such a broad subject, I will only make some general remarks.
If the optimizer can't decide which table to consider as driving, it will order them from left to right (cost-based optimizer) or right-to- left (rule-based optimizer).
If you think you have the correct order and you are using the cost- based optimizer (ie you have statistics on your table), you might consider using the /*+ordered*/ hint. The scenario with one table of only 15 rows, is the typical scenario for the optimizer to go astray. If you want to have more adequate advice, you should post the sql and the tkprof or autotrace explain plan output.

Hth,

--
Sybrand Bakker, Oracle DBA

All standard disclaimers apply
------------------------------------------------------------------------


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Sep 25 2000 - 14:06:56 CDT

Original text of this message

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