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 -> Oracle optimizer problem

Oracle optimizer problem

From: Don Del Grande <delgrandedp_at_navsea.navy.mil>
Date: 2 May 2002 08:35:20 -0700
Message-ID: <d210e76a.0205020735.626b7c54@posting.google.com>


When I run the following query:

DECLARE
  vd_data_dt DATE;
BEGIN
    vd_data_dt = TO_DATE('05/02/2002', 'MM/DD/YYYY');     INSERT INTO mytable
      (<fields>)
    SELECT <fieldlist>
    FROM table1 t1, table2 t2,...
    WHERE ...
    AND t1.data_dt > vd_data_dt;

it returns with a "max extents exceeded on temp tablespace" error. However, if I replace the last line with:

    AND t1.data_dt > TO_DATE('05/02/2002', 'MM/DD/YYYY')

then there is no problem.
Any ideas why using a local variable rather than something returned from TO_DATE would cause the query to change so dramatically? (Note that removing the entire last line works as well.) Received on Thu May 02 2002 - 10:35:20 CDT

Original text of this message

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