C OCI Function Server Round-Trips
This appendix provides information about server round-trips incurred during various OCI calls.
This information can help programmers to determine the most efficient way to accomplish a particular task in an application. A server round-trip is defined as the trip from the client to the server and back to the client.
- 
                        Enhanced array data manipulation language (DML) capability for arrays 
- 
                        Ability to associate a commit request with a run to reduce round-trips 
- 
                        Optimization for queries using transparent prefetch buffers to reduce round-trips 
See Also:
- 
                           Using SQL Statements in OCI for an overview and more specific information on tips to reduce server round-trips 
- 
                           OCI Array Interface to significantly reduce round-trips to the database when you are updating or inserting a large volume of data 
- 
                           About Setting Prefetch Count to minimize server round-trips 
This appendix contains these topics:
C.1 Relational Function Round-Trips
Describes for each OCI relational function the number of server round-trips.
Table C-1 lists the number of server round-trips required by each OCI relational function.
Table C-1 Server Round-Trips for Relational Operations
| Function | Number of Server Round-Trips | 
|---|---|
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | Connection pool or session pool: same as OCISessionGet() Normal: 2 (depends on authentication and TAF situation) | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | Session pool: 0 - increment of logins. Connection pool: 1 to (1+ (increment * logins)). Depends on cache hit: one for the user session, optional increment for primary sessions. Normal: 1 login | 
| 
 | sessMin * logins | 
| 
 | Sessions in cache * logoffs | 
| 
 | Session pooling: 0, except when explicit session destroys flag set Normal: 1 login | 
| 
 | 1 | 
| 
 | 0 or 1 | 
| 
 | 0 in prefetch, otherwise 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
C.2 LOB Function Round-Trips
Describes for each OCI LOB function the number of server round-trips.
Table C-2 lists the server round-trips incurred by the OCILob calls. 
                     
Note:
To minimize the number of round-trips, you can use the data interface for LOBs. You can bind or define character data for a CLOB column or RAW data for a BLOB column.
                        
For calls whose number of round-trips is "0 or 1," if LOB buffering is on, and the request can be satisfied in the client, no round-trips are incurred.
Table C-2 Server Round-Trips for OCILob Calls
| Function | Number of Server Round-Trips | 
|---|---|
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 1 for each modified page in the buffer for this LOB | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 1 round-trip if either the source or the destination locator refers to a temporary LOB | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 0 or 1 | 
| 
 | 0 or 1 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 or 1 | 
| 
 | 0 or 1 | 
| 
 | 0 or 1 | 
| 
 | 0 or 1 | 
See Also:
- 
                              About Binding LOB Data for usage and examples for both INSERTandUPDATEstatements
- About Defining LOB Datafor usage and examples of SELECTstatements
C.3 Object and Cache Function Round-Trips
Describes for each OCI object and cache function the number of server round-trips.
Table C-3 lists the number of server round-trips required for the object and cache functions. These values assume the cache is in a warm state, meaning that the type descriptor objects required by the application have been loaded.
Table C-3 Server Round-Trips for Object and Cache Functions
| Function | Number of Server Round-Trips | 
|---|---|
| 
 | 1 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 1; 0 if the desired object is already in cache | 
| 
 | 0 | 
| 
 | 1 | 
| 
 | 1 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
C.4 Describe Operation Round-Trips
Describes for each OCI operation function the number of server round-trips.
Table C-4 lists the number of server round-trips required by OCIDescribeAny(), OCIAttrGet(), and OCIParamGet().
                     
Table C-4 Server Round-Trips for Describe Operations
| Function | Number of Server Round-Trips | 
|---|---|
| 
 | 2 round-trips to describe a type if the type objects are not in the object cache 1 round-trip for each collection element, or each type attribute, method, or method argument descriptor. 1 more round-trip if using  0 if all the type objects to be described are already in the object cache following the first  | 
| 
 | 1 round-trip to get the  | 
| 
 | 0 | 
C.5 Data Type Mapping and Manipulation Function Round-Trips
Describes for each OCI data type mapping and manipulation function the number of server round-trips.
Table C-5 lists the number of round-trips for the data type mapping and manipulation functions. The asterisks in the table indicate that all functions with a particular prefix incur the same number of server round-trips. For example, OCINumberAdd(), OCINumberPower(), and OCINumberFromText() all incur zero server round-trips.
                     
Table C-5 Server Round-Trips for Data Type Manipulation Functions
| Function | Number of Server Round-Trips | 
|---|---|
| 
 | 0; 1 if the collection is not loaded in the cache | 
| 
 | 0 | 
| 
 | 0; 1 if the collection is not loaded in the cache | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0 | 
| 
 | 0; 1 if the nested table is not loaded in the cache | 
C.6 Any Type and Data Function Round-Trips
Describes for each OCI Any Type and Data function the number of server round-trips.
Table C-6 lists the number of server round-trips required by Any Type and Data functions. The functions not listed do not generate any round-trips.
Table C-6 Server Round-Trips for Any Type and Data Functions
| Function | Number of Server Round-Trips | 
|---|---|
| 
 | 0; 1 if the type information is not loaded in the cache | 
| 
 | 0; 1 if the type information is not loaded in the cache | 
| 
 | 0; 1 if the type information is not loaded in the cache | 
C.7 Other Local Functions
Describes for each OCI other local function the number of server round-trips.
Table C-7 lists the functions that are local and do not require a server round-trip.
Table C-7 Locally Processed Functions
| Local Function Name | Notes | 
|---|---|
| 
 | When describing an object type, this call makes one round-trip to fetch the type descriptor object. | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | |
| 
 | |
| 
 | 
 |