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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

how to escape special characters in sql statements? : Sql dba

509


What are instead of triggers?

621


What is the current version of sql?

538


Difference between global and parameter variables?

1453


Explain what is a subquery ?

654






What are the basic techniques of indexing?

573


What is the reports view in oracle sql developer?

539


What is memory optimized?

551


What is write ahead logging in sql server?

560


What is the execution plan in sql?

554


Is record in oracle pl sql?

529


Which is faster view or stored procedure?

500


What is informix sql?

535


What are sql indexes?

541


What does count (*) mean?

523