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

Query 9

In Query 9 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. Note that the advantage of using a field list is lost by not using a lookahead cursor. The DataServer uses the schema comparison cursor to retrieve column values by the PROGRESS_RECID column. Only those fields mentioned in the field list are available to the client.
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.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 = 57261
SELECT /*+ INDEX_ASC(T0 CUSTOMER##CUST_NUM) */ PROGRESS_RECID un
ique_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)