Data service layer (DSL) considerations when setting allowable ranges for Business Objects

Although most unbounded conditions can be detected and mitigated by the business components, it is still possible to leak out unbounded query statements into the Data Service Layer for execution that could eventually affect system performance or cause site outages.

You should be aware of the following considerations when creating your query expressions and templates in the Data Service Layer:
  • Using the COUNT SQL in the query template. DSL runs it to determine the exact size of the result set. This can, however, introduce small runtime overhead to the overall execution.
  • Using the returnPagingCountIfMaximumResultLimitExceeded flag, defined in the wc-component.xml file:
    <xsd:attribute name="returnPagingCountIfMaximumResultLimitExceeded" type="xsd:boolean" use="optional">	
    </xsd:attribute>

    This attribute determines whether the size of the result set needs to be included in the application exception message when the number of records returned by the XPath to SQL query exceeds the maximum as defined by the maximumPagingResultLimit attribute. The size of the result set is always returned if the paging count SQL query is provided for a given request. However, if such a query is not specified, the size of the result set will only be calculated if this attribute is set to true.

    Setting the value to true causes DSL to calculate the total record count. Although the count is more reliable and accurate, the processing cost could be high at runtime.

    Note: This attribute is optional, and the default value is false. That is, DSL throws an application exception when the page count maximum limit has been reached or exceeded. Therefore, the total count might not be very reliable in this case, but will perform better.