Improving performance when using inlineCount
- Last Updated: April 11, 2025
- 1 minute read
- Hybrid Data Pipeline
- Version 4.6
- Documentation
The $inlinecount OData system query
option includes the count of the number of entities that satisfy a query in the
response. The count is included in the first page in server-side paging, and in every
page when the client controls paging. Possible values for the parameter include allpages and none:
inlineCountQueryOp = "$inlinecount=" "allpages" | "none")
- For relational data stores, by default, Hybrid Data Pipeline sends a separate query to get the count before requesting the records. This behavior tends to result in a quicker response for the first page of results. However, it requires two queries to be executed rather than one. And, in some data sources, the count(*) aggregate is not efficiently implemented.
- For cloud-based data stores, by default, Hybrid Data Pipeline fetches the entire result before returning the first page. For small results, this approach will always be faster. However, this approach may have longer initial response time for the first page if the result is large.
This behavior can be changed in the data source definition, as described
in Configuring data sources for OData Version 2 connectivity or by using the
$inlineCount parameter. With a value of allpages, Hybrid Data Pipeline will include the count in
the response. For example:
https://<myserver>:<port>/api/odata/OracleOPTest/Customers?$inlinecount=allpages
With a value of none, Hybrid Data
Pipeline avoids obtaining a count and avoiding the associated overhead. For example:
https://<myserver>:<port>/api/odata/OracleOPTest/Customers?$inlinecount=none