Oracle DBMS_SQL package usage [message #59955] |
Mon, 05 January 2004 21:53 |
Richard Zhu
Messages: 1 Registered: January 2004
|
Junior Member |
|
|
Hello,
We have a lot of complicated static query statements in our stored procedures. These statements joins a few very big tables together. The execution of these statements are very slow.
As suggested by somebody, I put one of the query statement into DBMS_SQL.PARSE() and DBMS_SQL.EXECUTE() calls, then this statement executes much faster.
Does anybody know why the same query runs faster in DBMS_SQL calls? Is it because DBMS_SQL will treat the statement as dynamic statement and try to restruct the statement to improve the execution performance.
In this case, should I change all my complicated static query statements to be called using DBMS_SQL calls?
Any advices are very much appreciated.
Richard Zhu
|
|
|