Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on use of bulkbind in pl/sql within the SQL forums, part of the Databases category; what is the use of bulkbind in pl/sql with example...
|
|||||||
|
|||
|
Re: use of bulkbind in pl/sql
Oracle uses two engines to process PL/SQL code. All procedural code is handled by the PL/SQL engine while all SQL is handled by the SQL engine. There is an overhead associated with each context switch between the two engines. If PL/SQL code loops through a collection performing the same DML operation for each item in the collection it is possible to reduce context switches by bulk binding the whole collection to the DML statement in one operation.
Simple Example declare type emp_type is table of varchar2(100) index by binary_integer; emp_t emp_type; begin select empno bulk collect into emp_t from scott.emp; for i in emp_t.first ..emp_t.last loop dbms_output.put_line(emp_t(i)); end loop; end;
__________________
Sireesha |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|