Try OpenEdge Now
skip to main content
DataServer for Oracle
Sample Queries : Query 7
 

Query 7

In Query 7 presented in this section, note the following points related to cursor behavior:
<2>   The DataServer uses the cursor to compare schema information. It does not fetch any column values.
<3>   The cursor selects only the fields in the field-list. The default cache-size of 8192 is sufficient to hold 106 rows. A single fetch retrieves the entire CUSTOMER table.
FOR EACH customer FIELDS (name custnum postalcode) NO-LOCK:
  DISPLAY customer.name customer.custnum customer.postalcode.
END.
OCI call OCIStmtPrepare <2> sqlcrc = 41633
SELECT /*+ INDEX(T0 CUSTOMER##PROGRESS_RECID) */ * FROM DOCTEST.C
USTOMER T0 WHERE PROGRESS_RECID = :rid
OCI call OCIStmtExecute-DescribeOnly <2>
OCI call omru <2>
OCI call OCIHandleAlloc <0>
OCI call OCIStmtPrepare <3> sqlcrc = 40887
SELECT /*+ INDEX_ASC(T0 CUSTOMER##CUST_NUM) */ PROGRESS_RECID un
ique_id_0,CUST_NUM,NAME,POSTAL_CODE FROM DOCTEST.CUSTOMER T0
OCI call OCIStmtExecute <3>
OCI call omru <3>

Cursor <3> Rows processed 85 (last execution)
Number of array fetches 1
Number of rows fetched 85
Number of array rows 105
Number of array columns 4
Number of tables 1
Space for one row 78
Requested cache size 8192
Actual cache size used 8190
OCI call OCIHandleFree <0>

Cursor <2> Rows processed 0 (last execution)
OCI call OCIHandleFree <0>