Home » SQL & PL/SQL » SQL & PL/SQL » Dynamic query
Dynamic query [message #10788] Tue, 17 February 2004 06:32
Tony
Messages: 190
Registered: June 2001
Senior Member
i wrote two queries first one was a static query which looked somthin like this

select sum(qnty)
from table_name
where...

the same query i wrote using EXEC IIMMEDIATE like
stmt:='SELECT*........'
execute immediate stmt into sum using x
somthin like above

now i found that the exec immediate ran a lot more faster than the static query, although it wasnt used in any loop. can somone tell me why performance was enhanced in exec immediate again someone tell me the diff between EXEC immediate and dbms_sql..which is better
Previous Topic: String
Next Topic: Urgent Please
Goto Forum:
  


Current Time: Sat Apr 20 07:54:35 CDT 2024