I have a CURSOR then why we need BULK COLLECT again?



I have a CURSOR then why we need BULK COLLECT again?..

Answer / priya

"PL/SQL sends SQL statements such as DML and queries to the
SQL engine for execution, and SQL returns the results to
PL/SQL. You can minimize the performance overhead of this
communication between PL/SQL and SQL by using the PL/SQL
features that are known collectively as bulk SQL.

The FORALL statement sends INSERT, UPDATE, or DELETE
statements in batches, rather than one at a time. The BULK
COLLECT clause brings back batches of results from SQL. If
the DML statement affects four or more database rows, bulk
SQL can improve performance considerably.

Bulk SQL uses PL/SQL collections to pass large amounts of
data back and forth in single operations. This process is
called bulk binding. If the collection has n elements, bulk
binding uses a single operation to perform the equivalent of
n SELECT INTO, INSERT, UPDATE, or DELETE statements. A query
that uses bulk binding can return any number of rows,
without requiring a FETCH statement for each one."

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Which normal form is best?

0 Answers  


What is parameter substitution in sql?

0 Answers  


Are stored procedures faster than queries?

0 Answers  


What is compilation error in pl sql?

0 Answers  


Can you selectively load only those records that you need? : aql loader

0 Answers  






What is the advantage of nosql?

0 Answers  


How do I find duplicates in the same column?

0 Answers  


How do I run pl sql in sql developer?

0 Answers  


What are pl sql data types?

0 Answers  


Write a query to get 2nd maximum salary in an employee table ?

69 Answers   Accenture, BirlaSoft, Letse, Logica CMG, Qwest, Rheal Software, Saagam, Semantic Space, Tailor Solution, TCS, TinyERP,


How to access the current value and next value from a sequence?

6 Answers  


what is the difference between union and union all? : Sql dba

0 Answers  


Categories