Try OpenEdge Now
skip to main content
Debugging and Troubleshooting
Troubleshooting Resources : Log Entry Types Detail : Query information logging : Sample query information logs
 
Sample query information logs
Sample output formats (with headers suppressed) of query information logs are shown.
The following is a code example for a non-pre-pass query:

FOR EACH invoice
WHERE ((invoice.ordernum >= 102) AND
(invoice.custnum >= 28 AND invoice.custnum <= 30) AND
(invoice.invoicenum > 100 AND invoice.invoicenum <= 105)) OR
((invoice.ordernum > 118 AND invoice.ordernum <= 119) AND
(invoice.custnum = 46) AND
(invoice.invoicenum > 115 AND invoice.invoicenum < 120)) OR
(invoicenum = 136),
EACH order WHERE order.ordernum = invoice.ordernum:
DISPLAY invoice.invoicenum order.ordernum.
END.
The following is an example of the query plan for a non-pre-pass query:

Query Plan: qisample1.p line 1
QueryId: 0x159e004
Type: FOR Statement
Client Sort: N
Scrolling: N
Table: sports2000.Invoice
Indexes: InvoiceNum,CustNum
Table: sports2000.Order
Indexes: OrderNum
The following is an example of the query statistics for a non-pre-pass query:

Query Statistics: qisample1.p line 11
QueryId: 0x159e004
DB Blocks accessed:
sports2000 : 43
DB Reads:
Table: sports2000.Invoice : 11
Index: Invoice.InvoiceNum : 8
Index: Invoice.CustNum : 6
Table: sports2000.Order : 3
Index: Order.OrderNum : 6
sports2000.Invoice Table:
4GL Records: 3
Records from server: 3
Useful: 3
Failed: 0
Select By Client: N
sports2000.Order Table:
4GL Records: 3
Records from server: 3
Useful: 3
Failed: 0
Select By Client: N
The following is a code example for a pre-pass query:

FOR EACH invoice
WHERE ((invoice.ordernum >= 102) AND
(invoice.custnum >= 28 AND invoice.custnum <= 30) AND
(invoice.invoicenum > 100 AND invoice.invoicenum <= 105)) OR
((invoice.ordernum > 118 AND invoice.ordernum <= 119) AND
(invoice.custnum = 46) AND
(invoice.invoicenum > 115 AND invoice.invoicenum < 120)) OR
(invoicenum = 136),
EACH order WHERE order.ordernum = invoice.ordernum BY invoice.custnum:
DISPLAY invoice.invoicenum order.ordernum.
END.
The following is an example of the query plan for a pre-pass query:

Query Plan: qisample2.p line 1
QueryId: 0x159e006
Type: FOR Statement
Client Sort: Y
Scrolling: N
Table: sports2000.Invoice
Indexes: CustNum,InvoiceNum
Table: sports2000.Order
Indexes: OrderNum
The following is an example of the query statistics for building the result-list on a pre-pass query:

QueryId: 0x159e006
Entries in result list: 3
Time to build result list (ms): 16
DB Blocks accessed to build result list:
sports2000 : 38
DB Reads to build result list:
Table: sports2000.Invoice : 15
Index: Invoice.CustNum : 16
Index: Invoice.InvoiceNum : 2
Table: sports2000.Order : 0
Index: Order.OrderNum : 0
sports2000.Invoice Table:
Records from server: 3
Useful: 3
Failed: 0
Select By Client: N
sports2000.Order Table:
Records from server: 0
Useful: 0
Failed: 0
Select By Client: N
The following is an example of the second query statistics (record retrieval) on a pre-pass query:

Query Statistics: qisample2.p line 12
QueryId: 0x159e006
DB Blocks accessed:
sports2000 : 15
DB Reads:
Table: sports2000.Invoice : 3
Index: Invoice.CustNum : 0
Index: Invoice.InvoiceNum : 0
Table: sports2000.Order : 3
Index: Order.OrderNum : 6
sports2000.Invoice Table:
4GL Records: 3
sports2000.Order Table:
4GL Records: 3
The following is an example of the query statistics when the read access statistics for the table and index are outside of range:

Query Statistics: idxnum.p line 6
QueryId: 0x159f3ec
DB Blocks accessed:
sports2004 : 272
DB Reads:
Table: sports2004.item : UNAVAILABLE Index: item.Item_Obj : UNAVAILABLEsports2004.item Table:
4GL Records: 134
Records from server: 134
Useful: 134
Failed: 0
Select By Client: N