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
Can we create table in function?
What is the difference between rollback and rollback to statements?
what is the difference between where clause and having clause? : Sql dba
how to get @@error and @@rowcount at the same time? : Sql dba
Can we use threading in pl/sql?
How many developers work on postgresql?
how many groups of data types? : Sql dba
Explain the working of foreign key?
Does a primary key have to be a number?
What is the advantage of index in sql?
What is the starting oracle error number?
what is meant by nl2br()? : Sql dba
Are subqueries better than joins?
Is oracle and sql same?
What is pragma in pl sql?