Troubleshooting
Problem
How to avoid the YFS_Order_HeaderDBHome.countWithWhereRS query during getOrderList call?
Symptom
getOrderList API fires the following query to populate the TotalNumberOfRecords attribute. This query is template driven.
SELECT /*YANTRA*/ count(1) from YFS_ORDER_HEADER YFS_ORDER_HEADER WHERE ( ( YFS_ORDER_HEADER.ENTERPRISE_KEY = 'UNISYS' ) AND ( YFS_ORDER_HEADER.DOCUMENT_TYPE = '0009.ex' ) AND ( YFS_ORDER_HEADER.CREATETS >= '20091010000000' AND YFS_ORDER_HEADER.CREATETS <= '20091110115323' ) AND ( YFS_ORDER_HEADER.EXTN_REFERENCE_1 LIKE '%332131261%' ) )</p> <p>In the cases of broadsearch criteria as shown above and if OrderHeader table has millions of records(The client who faced this issue had more than a million records) then this query may be really expensive and can take a long time to execute.
Resolving The Problem
If customer would like to suppress this query in case if customer is not making use of the TotalNumberOfRecords attribute in the output of getOrderList, they can just remove the TotalNumberOfRecords attribute from the getOrderList output template.
Historical Number
NFX7928
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21559182