Databases Reference
In-Depth Information
EXECUTE IMMEDIATE l_stmt;
END;
END TEST_INJECTION2;
END;
/
We are now ready to test bind variables.
How to do it...
We can test bind variables as follows:
1.
Connect to the database as SYSDBA :
CONNECT / AS SYSDBA
2. Flush the shared pool to be sure that previous statements don't influence
current executions of the query:
ALTER SYSTEM FLUSH SHARED_POOL;
3.
Execute the WORKLOAD_NOBIND procedure, keeping track of the timing:
SET TIMING ON
exec sh.CHAPTER4.WORKLOAD_NOBIND;
SET TIMING OFF
4.
Execute the WORKLOAD_BIND procedure, keeping track of the timing, after
flushing the cache from the previous statement's execution:
ALTER SYSTEM FLUSH SHARED_POOL;
SET TIMING ON
exec sh.CHAPTER4.WORKLOAD_BIND;
SET TIMING OFF
5.
Execute the WORKLOAD_BIND_STATIC procedure; keep track of the
execution time:
ALTER SYSTEM FLUSH SHARED_POOL;
SET TIMING ON
exec sh.CHAPTER4.WORKLOAD_BIND_STATIC;
SET TIMING OFF
Review the results.
 
Search WWH ::




Custom Search