Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle optimizer problem
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
![]() |
![]() |