The Selector screen lets you define your own searches (or queries) on your data.
The way you structure your query can affect how long it takes to complete – the more data the system has to search, process, and display, the longer your search will take.
From release 8.6.1.080, the Selector screen provides on-screen color-coding and hints to help you create better-performing selector queries.
Query properties are color-coded to indicate the potential impact they will have on your query. For the best performing query use query properties with a light-green background – these are dictionary keys and help to reduce the amount of data the system has to search. Simple query properties display a white background.
If the query property is for complex data (which is data that requires some processing to obtain), it has a light-red background. Use complex query properties sparingly as they will slow down your query.
Similarly, in the search results table, column headers are colored light-red for data that requires additional processing to display. These columns may slow down the display of your search results.
The colors are explained in the Color Legend screen, which is displayed if you right-click in the search results table and then select the Color Legend command.
Use dictionary keys and simple query properties, where possible
Dictionary key (light-green) and simple (white) query property types require less processing than complex (light-red) query properties. The less data processing the system needs to do, the faster your query.
Order your query properties to maximize the efficiency of the query
At the top of the query criteria list, include the query properties that will help to reduce the number of entities that the system has to search.
Example: You have a yard full of containers most of which are 20‑foot, and most of which have not been there long, and you want to find 20‑foot containers that had been in the yard for more than 100 days.
Your query would include query properties to determine (or test) the number of dwell days and a test for 20‑foot containers. Placing the dwell test before the 20‑foot test in your query order would be more efficient, because the total number of tests on data would be less. Most non‑matching containers would only need one test (the dwell test) before being eliminated. If you placed the test for 20‑foot containers first, most non-matching items would pass the first test and then need the dwell test as well before being eliminated.
|The Dwell Days query property is more efficient before the 20-foot query property for this query.|
Use the minimum number of query properties to describe your query
Be as specific as possible in your query properties – the number of query properties determines how much data the system needs search. The less data the system needs to search, the faster your query (but an extra query property can sometimes help to reduce the amount of data the system needs to search).
Include only the relevant columns in the search results table
It takes longer to display your search results if you have lots of columns or columns with complex data in your search results table.
If the column heading is for complex data (= data that requires processing to display), it has a light-red background. Use these columns sparingly.
Try to use column headings with a gray background – this is simple data that the system doesn’t have to process much.
The more columns that are included in the search results table, the more data the system has to process and display, which could lead to an increase in the length of time to display your search results.
Same query as above but with more columns in the search results table:
|The same search results took longer to display because there are more columns in the search results table.|
Use the Column Organizer screen to specify which columns to display in the search results table.
So, for improved performance in your queries:
- Use more dictionary keys (light-green properties).
- Try to use fewer query properties overall (particularity avoiding the complex properties).
- Consider the order of the properties.
- Minimize the number of columns in the results table.
You can use the ideas in this blog post in any release. However, the selector screen has color-coding and hints only from release 8.6.1.080 onwards.