Using paging to improve query performance - SmartPlant Foundation - IM Update 46 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)

Finds and queries can be performed in paged mode. The client API for the find and query methods has an optional argument for the page size. When set, the query is performed and returns only the first page of the data, containing the number of objects in the page size argument, in the list view. A paging toolbar allows you to navigate through the entire data set for the query in small segments or pages.

Paging queries provide the ability to run complex searches, and then retrieve and show the information from the search results based on the number of objects you want to see per page. The software retrieves objects from the database only when you navigate to a page, when it then presents the information for that page. After you have viewed a page, the information is stored in a cache.

The Paging toolbar has a Show All button, which is disabled by default. To use the button, configure the Enables Show All button for page query argument on the method.

The following items explain what to expect regarding query performance when using paged queries.

  • Each page of information in the Desktop Client is cached, so if you scroll back and forth between the pages, no additional searching occurs.

  • Click Show All to retrieve and display the whole set of query results, and then change the sort order or filter the whole set.

  • Clicking Show All retrieves only the data that has not already been cached. A message appears when you click Show All indicating the number of objects being retrieved and allowing you to continue or cancel the operation.

Sorting and filtering commands work only on the displayed page.

paging query toolbar

Paged queries are disabled by default. For instructions to add the model into existing databases and enable paged queries, see Common methods.