RE: Query takes ages in Oracle 10G

  • From: "Allen, Brandon" <Brandon.Allen@xxxxxxxxxxx>
  • To: <isabel_bga@xxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 21 Sep 2006 14:24:39 -0700

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.

Other related posts: