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 -> Help: Explain plan problem

Help: Explain plan problem

From: Mike F <u518615722_at_spawnkill.ip-mobilphone.net>
Date: Sat, 26 Jan 2002 13:18:25 GMT
Message-ID: <l.1012051105.1249572753@pool-151-197-235-121.phil.east.verizon.net>


I have a table test
SQL> desc test

 Name                      Type
 --------------- ----------------------------
 START_TIME                DATE
 END_TIME                  DATE

SQL> explain plan for
  2 select (end_time - :b1)*60*24
  3 from test
  4 where end_time < :b1
  5 and start_time > :b1;
select (end_time - :b1)*60*24

                 *

ERROR at line 2:
ORA-00932: inconsistent datatypes

but if I remove *60*24, I can explain it. 1 explain plan for
  2 select (end_time - :b1)
  3 from test
  4 where end_time < :b1
  5* and start_time > :b1
SQL> / Explained.

But the first statement does not seem to use the same plan as the second one, instead, the first statement use a much more expensive one, why?

The second question, for the 1st statement, if oracle can not explain it, why oracle can execute it without giving error message?

Thanks for you help.  

-- 
Sent by  dbadba62  from hotmail  within field com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com/cgi/content/new
Received on Sat Jan 26 2002 - 07:18:25 CST

Original text of this message

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