Geeks Talk

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.

use of bulkbind in pl/sql

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...

Go Back   Geeks Talk > Databases > SQL
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 10-12-2009
Junior Member
 
Join Date: May 2008
Location: india
Posts: 5
Thanks: 3
Thanked 0 Times in 0 Posts
reddy.sangamesh545 is on a distinguished road
use of bulkbind in pl/sql

what is the use of bulkbind in pl/sql with example
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 3 Weeks Ago
Expert Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 518
Thanks: 30
Thanked 63 Times in 61 Posts
susarlasireesha will become famous soon enough
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
Reply With Quote
Reply

  Geeks Talk > Databases > SQL

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -4. The time now is 09:54 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved