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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Query takes ages in Oracle 10G

RE: Query takes ages in Oracle 10G

From: Allen, Brandon <Brandon.Allen_at_OneNeck.com>
Date: Thu, 21 Sep 2006 14:24:39 -0700
Message-ID: <04DDF147ED3A0D42B48A48A18D574C45059E1FA1@NT15.oneneck.corp>


If I understand correctly, you're saying that the following query is the problem - it runs slow by itself, regardless of the other sub and parent queries:  

SELECT VENCIM_TITULO_NUMERO___

                                FROM   VENCIM
                                WHERE  VENCIM_ESCENA_CODIGO___ = 'REAL'
AND
                                       VENCIM_PORTAF_CODIGO___ = 'OBL'
AND
                                       VENCIM_ESTADO___ = 2

   AND
                                       VENCIM_FECCOBORI <= '21/09/2006'
 

Is that correct?  

What was the explain plan for this query when you traced it?  

Maybe it is expecting the date predicate to be more selective than it really is so it's using an index there instead of a FTS?  

Maybe the problem could be related to auto gathering of histograms in 10g? Try deleting histograms on the table and see if that helps. Or, on the contrary, maybe your auto stats job hasn't run yet in your new 10g database so your stats are absent or out of date?    

Privileged/Confidential Information may be contained in this message or attachments hereto. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of this company shall be understood as neither given nor endorsed by it.

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Sep 21 2006 - 16:24:39 CDT

Original text of this message

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