In Query 12 presented in this section, note the following points related to cursor behavior:

<2>   The DataServer uses the cursor to compare schema information and fetch CUSTOMER rows.

<3>   The DataServer uses the cursor to compare schema information. It does not fetch any column values. Note that because the ORDER_ table contains a date, the DataServer does not reuse this cursor to fetch column values.

<4>   The cursor is used to perform the join by the SQLDB. It uses a standard cursor for the join. Each row of the join requires 8 bytes of the cache because the join cursor fetches only the unique integer record identifiers.

<5>   The DataServer uses this cursor to fetch ORDER_ rows by the PROGRESS_RECID column. It cannot use the schema comparison cursor (<39>) because the DataServer must perform a TO_CHAR conversion on the date columns.

FOR EACH customer FIELDS (name custnum postalcode) NO-LOCK,
  EACH order FIELDS (orderdate salesrep) OF customer NO-LOCK
    QUERY-TUNING (NO-LOOKAHEAD):
  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.CUSTOMER T0 WHERE PROGRESS_RECID = :rid
OCI call OCIStmtExecute-DescribeOnly <2>
OCI call omru   <2>
OCI call OCIStmtPrepare <3>     sqlcrc = 60664
    SELECT /*+ INDEX(T0 ORDER_##PROGRESS_RECID) */ * FROM 
      DOCTEST.ORDER_ T0 WHERE PROGRESS_RECID = :rid
OCI call OCIStmtExecute-DescribeOnly <3>
OCI call omru   <3>
OCI call OCIStmtPrepare <4>     sqlcrc = 48763
    SELECT T0.PROGRESS_RECID unique_id_0,T1.PROGRESS_RECID 
      unique_id_1 FROM DOCTEST.CUSTOMER T0,DOCTEST.ORDER_ T1 
      WHERE (T1.CUST_NUM = T0.CUST_NUM)
OCI call OCIStmtExecute <4>
OCI call omru   <2>
OCI call OCIStmtExecute <2>
OCI call OCIStmtPrepare <5>     sqlcrc = 18715
    SELECT /*+ INDEX(T0 ORDER_##PROGRESS_RECID) */ ORDER_NUM,CUST_NUM
    ,TO_CHAR(ORDER_DATE,'YYYYMMDDHH24MISS'),TO_CHAR(SHIP_DATE,'YYYYMM
    DDHH24MISS'),TO_CHAR(PROMISE_DATE,'YYYYMMDDHH24MISS'),CARRIER,INS
    TRUCTIONS,PO,TERMS,SALES_REP,PROGRESS_RECID  FROM DOCTEST.ORDER_ 
    T0 WHERE PROGRESS_RECID = :rid
OCI call omru   <5>
OCI call OCIStmtExecute <5>
OCI call omru   <2>
OCI call OCIStmtExecute <2>
      < repeat, alternating handles 5 and 2 >
     Cursor <4> Rows processed 207 (last execution)
     Number of array fetches  2
     Number of rows fetched   207
     Number of array rows     128
     Number of array columns  2
     Number of tables         2
     Space for one row        8
     Requested cache size     1024
     Actual cache size used   1024
OCI call OCIHandleFree <0>
     Cursor <5> Rows processed 1 (last execution)
     Total Rows processed     206 (previous executions)
OCI call OCIHandleFree <0>
     Cursor <2> Rows processed 1 (last execution)
     Total Rows processed     203 (previous executions)
OCI call OCIHandleFree <0>
     Cursor <3> Rows processed 0 (last execution)