Prerequisites
- A working powersheet document with configured data sources
- Familiarity with entity queries and predicates
- Access to Polarion server logs for debug output
Understand the Query Processing Pipeline
where clause is applied together with the entity type, the project and the data model constraints. If any predicate is not supported for its field, the whole query stops with an error instead of skipping it (see Query Execution). Performance depends on how far your constraints and predicates narrow the result.Prefer Exact Comparisons
where clause to use these operators:and at the top level automatically, so flat predicate structures perform best:Add Project and Document Constraints
where clause:where clause, so they narrow the search scope.For dynamic document scoping, use applyCurrentDocumentTo in your constraints so the sheet automatically filters to the current LiveDoc without hardcoding document paths:Limit Navigation Property Expansion Depth
expand clauses cause cascading queries. Each expansion level triggers additional database lookups for related entities:Optimize Sort Clauses
query: block, use orderBy to determine the order of returned results. (Note that sortBy is a separate sheet-level option that belongs at the YAML root, not inside query:.)designRequirement.title) requires the server to resolve relationships before sorting, which adds overhead.orderBy is specified, results come back in Polarion’s default order (typically by work item ID). Specify outlineNumber asc for document-ordered display.Scope Enum Sources Efficiently
EnumOption entities. To avoid unnecessary queries:- Only include enum columns in views where they are needed
- Use constraints on enum queries to limit results to the relevant project and work item type
- The auto-discovery uses
polarionType,projectId, andenumIdmetadata to build targeted queries
Enable Query Debug Mode
explain query parameter. With explain enabled, the server returns diagnostic details about the executed query along with the response, and writes the query to the server log.explain parameter in query configuration enables additional diagnostic information.Performance Decision Matrix
Verify
After applying optimization changes:- Open the powersheet document and note the initial load time
- You should now see faster data loading compared to before your changes
- Confirm the sheet loads without a query error
- Test with views that hide deep expansion columns to confirm they load faster
See Also
- Write an Entity Query — query structure fundamentals
- Use Predicates — predicate operator reference
- Filter by Document — document scoping techniques
- Expand Navigation Properties — controlling expansion depth
- Query Baseline or Revision — historical query considerations
- Configure Sources — data source setup