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

Query 8

In Query 8 presented in this section, note the following points related to cursor behavior:
<2>   The DataServer uses the cursor to compare schema information and fetch column values.
<3>   This is a standard cursor. The default cache size is 1024. Since the DataServer fetches only the PROGRESS_RECID column, it requires only 4 bytes for each row. A single fetch retrieves all 85 PROGRESS_RECID values in the CUSTOMER table.
FOR EACH customer FIELDS (name custnum postalcode) NO-LOCK
  QUERY-TUNING (NO-LOOKAHEAD):
  DISPLAY customer.name customer.custnum customer.postalcode.
END.
OCI call OCIStmtPrepare <2> sqlcrc = 41633
SELECT /*+ INDEX(T0 CUSTOMER##PROGRESS_RECID) */ * FROM
DOCTEST.CUSTOMER T0 WHERE PROGRESS_RECID = :rid
OCI call OCIStmtExecute-DescribeOnly <2>
OCI call omru <2>
OCI call OCIHandleAlloc <0>
OCI call OCIStmtPrepare <3> sqlcrc = 57261
SELECT /*+ INDEX_ASC(T0 CUSTOMER##CUST_NUM) */ PROGRESS_RECID
unique_id_0 FROM DOCTEST.CUSTOMER T0
OCI call OCIStmtExecute <3>
OCI call omru <2>
OCI call OCIStmtExecute <2>
OCI call omru <2>
< repeat for each row >
OCI call OCIStmtExecute <2>
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 256
Number of array columns 1
Number of tables 1
Space for one row 4
Requested cache size 1024
Actual cache size used 1024
OCI call OCIHandleFree <0>
Cursor <2> Rows processed 1 (last execution)
Total Rows processed 84 (previous executions)
OCI call OCIHandleFree <0>