In Query 10 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 DataServer uses the cursor to compare schema information. It does not fetch any column values.

<4>   The cursor is used to perform the join by the SQLDB. Since the query specifies NO-LOCK, this cursor selects the fields in the field list in addition to those that the client requires (T0.PROGRESS_RECID, T1.PROGRESS_RECID, T1.CUST_NUM). With the default cache size of 8192, processing the entire join requires 3 array fetches.

FOR EACH customer FIELDS (name custnum postalcode) NO-LOCK,
  EACH order FIELDS (orderdate salesrep) OF customer NO-LOCK:
  DISPLAY customer.name customer.custnum customer.postalcode
    order.orderdate order.salesrep.
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 = 60664
     SELECT /*+ INDEX(T0 ORDER_##PROGRESS_RECID) */ * FROM DOCTEST.ORD
     ER_ T0 WHERE PROGRESS_RECID = :rid
 OCI call OCIStmtExecute-DescribeOnly <3>
 OCI call omru   <3>
 OCI call OCIHandleAlloc <0>
 OCI call OCIStmtPrepare <4>     sqlcrc = 51753
     SELECT T0.PROGRESS_RECID unique_id_0,T0.CUST_NUM,T0.NAME,T0.POSTA
     L_CODE,T1.PROGRESS_RECID unique_id_1,T1.ORDER_DATE,T1.SALES_REP F
     ROM DOCTEST.CUSTOMER T0,DOCTEST.ORDER_ T1 WHERE (T1.CUST_NUM = T0
     .CUST_NUM)
 OCI call OCIStmtExecute <4>
 OCI call OCIStmtFetch <4>
 OCI call OCIStmtFetch <4>
 OCI call omru   <4>
       Cursor <4> Rows processed 207 (last execution)
      Number of array fetches  3
      Number of rows fetched   207
      Number of array rows     87
      Number of array columns  7
      Number of tables         2
      Space for one row        94
      Requested cache size     8192
      Actual cache size used   8178
 OCI call OCIHandleFree <0>
       Cursor <3> Rows processed 0 (last execution)
 OCI call OCIHandleFree <0>
       Cursor <2> Rows processed 0 (last execution)
 OCI call OCIHandleFree <0>