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: Queries running slow during a batch process

Re: Queries running slow during a batch process

From: SL <sebastien-louchart_at_wanadoo.fr>
Date: 20 Sep 2006 08:47:58 -0700
Message-ID: <1158767277.913359.150450@h48g2000cwc.googlegroups.com>

Ferrari_NYC a écrit :

> Hello Sebastien
>
> It's OPTIMIZER_MODE=CHOOSE and the statistics are properly gathered and
> up-to-date. The Oracle is the 9.2.0.6.0 and the OS is Solaris 8.

OK.
I don't know the reason for that but it happens (I experienced that myself) that some batch queries appear into the V$SQL view as having an optimizer_mode=NONE though having a plan computed as if having the CHOOSE option (as far as TKPROF shows).

Did you tkprof your queries ?
Can you post the plan here ?

As D.A. Morgan posted, the reason why select on empty tables are slow is that storage affected to each table segment is huge so many blocks are read until Oracle notices that the table is actually empty . Depending on how often and how aggressively those tables are inserted and fully deleted, you may consider an TRUNCATE TABLE ... DROP STORAGE to get rid of the big segment. The drawback is that when the table will need storage for bulk INSERTS, reallocating storage can be an overhead.

-- 
SL
Received on Wed Sep 20 2006 - 10:47:58 CDT

Original text of this message

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