Using host arrays - bulk bind performance improvement, PL-SQL Programming

Using Host Arrays

The Client-side programs can use anonymous PL/SQL blocks to bulk-bind input and output host arrays. However, this is the well-organized way to pass the collections to and from the database server.

The Host arrays are declared in a host environment like an OCI or Pro C program and should be prefixed with a colon to differentiate them from PL/SQL collections. In the illustration below, an input host array is used in the DELETE statement. At run time, the anonymous PL/SQL block is sent to the database server for the execution.

DECLARE

...

BEGIN

-- assume that values were assigned to the host array

-- and host variables in the host environment

FORALL i IN :lower..:upper

DELETE FROM emp WHERE deptno = :depts(i);

...

END;

Posted Date: 10/4/2012 3:32:15 AM | Location : United States







Related Discussions:- Using host arrays - bulk bind performance improvement, Assignment Help, Ask Question on Using host arrays - bulk bind performance improvement, Get Answer, Expert's Help, Using host arrays - bulk bind performance improvement Discussions

Write discussion on Using host arrays - bulk bind performance improvement
Your posts are moderated
Related Questions
What Are Cursor Variables  ? The Cursor variables are like C or Pascal pointers that hold the memory location (address) of some item rather of the item itself. Therefore, decl

Count Operator in SQL Example: Counting the students who have scored more than 50 in some exam (SELECT COUNT (*) FROM (SELECT DISTINCT StudentId FROM EXAM_MARK WHE

Advantages of PL/SQL The PL/SQL is a high-performance transaction processing, completely portable language that offers the following advantages as shown: 1) Support for SQL

Rephrase Conditional Control Statements When computing a logical expression, the PL/SQL uses short-circuit evaluation. That is, the PL/SQL stops evaluating the expression as s

Expressions   An expression is a randomly complex combination of the constants, variables, literals, operators, & function calls. The simplest expression is the single variabl

Initializing Records The illustration below shows that you can initialize a record in its type definition. Whenever you declare a record of the type TimeRec, its 3 fields supp

Inserting Objects: You can use the INSERT statement to add objects to an object table. In the illustration below, you insert a Person object into the object table persons:

Fetching from a Cursor Variable The FETCH statement retrieve rows one at a time from the product set of a multi-row query. The syntax for the same is as shown: FETCH {curso

Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to the

Collections:   The collection is an ordered group of elements, all of similar type (for illustration, the grades for a class of students). Each element has an exclusive subsc