| Oracle® Call Interface Programmer's Guide 11g Release 2 (11.2) Part Number E10646-08  | 
  | 
  | 
PDF · Mobi · ePub | 
This appendix provides information about server round-trips incurred during various OCI calls. A server round-trip is defined as the trip from the client to the server and back to the client. This information can help programmers to determine the most efficient way to accomplish a particular task in an application.
This appendix contains these topics:
This appendix provides information about server round-trips incurred during various OCI calls. This information can be useful when determining the most efficient way to accomplish a particular task in an application.
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  | 
| 
 
  | 
 1  | 
| 
 
  | 
 1  | 
| 
 
  | 
 1  | 
| 
 
  | 
 1  | 
| 
 
  | 
 1  | 
| 
 
  | 
 1  | 
| 
 
  | 
 1  | 
| 
 
  | 
 0  | 
| 
 
  | 
 0  | 
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 aCLOB column or RAW data for a BLOB column.See Also:
"Binding LOB Data" for usage and examples for both INSERT and UPDATE statements
"Defining LOB Data" for usage and examples of SELECT statements
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  | 
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  | 
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  | 
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  | 
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  | 
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.  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
 
  | 
| 
 
  | 
|
| 
 
  | 
|
| 
 
  | 
 
  |