Improvement on Query performance implemented in 8.17 and 8.41
Performance issue getting a list of Queries and/or Records on the Web/Windows Client and running Queries on the Web for 8.x.
To improve the performance, Development has added two mechanisms. Therefore starting with PeopleTools 8.17, when bringing up a list of Queries, the system will first check:
- whether a temp Record has been created from the App Engine run job to store the data of the SQL statement
- SQL Object
- pull data using the SQL statement directly from the Database (PTools 8.16)
Here is the description of the 2 mechanisms:
**********************************************************
1. This specific Incident (T-SSHAIK-XQ8LT) discusses a new App Engine program that has been built to de-normalizes some of the Tables that are used to build the Query Access List. If the Customer chooses to use this new feature, it will greatly simplify the SQL that needs to be executed by Query to build Access List — regardless of what process is running the Query, i.e. would work the same for Crystal as it does for online Query. This new feature is called Query Access List Cache. Here is some more information regarding it:
**********************************************************
Excerpt From Query PeopleBook Enhancement for 8.17 -
Enabling Query Access List Cache
A new optional Query Access List Cache batch process is now available for Users who work with Query Manager, Crystal Reports, and PS/nVision. When the Access List Cache is enabled, the time taken by the system to retrieve the Queries that match the search criteria entered is greatly improved.
Maintain Security – Query Access List Cache page
To enable the Access List Cache:
1. Select PeopleTools, Maintain Security, Setup, Query Access List Cache.
2. Select Enable List Cache.
3. Select the Run button to run the process.
If the process does not complete, the Cache will be disabled.
From Query PeopleBook in 8.4x -
Enabling Query Access List Cache
A new optional Query Access List Cache batch process is now available for Users who work with Query Manager, Crystal Reports, and PS/nVision. When the Access List Cache is enabled, the time taken by the system to retrieve the Queries that match the search criteria entered is greatly improved.
Security – Query Access List Cache page
To enable the Access List Cache:
1) Select PeopleTools, Security, Query Security, Query Access List Cache.
2) Select Enable List Cache.
3) Select the Run button to run the process.
If the process does not complete, the cache will be disabled.
Note. Rerun the process when changes have been made to Query Access Groups or Query Access Group settings on Roles or Permission Lists.
If you need to be able to tell if the Cache is working:
1) Clear the Access List Cache.
2) Load Windows Query directly by running psqed.exe and use a stopwatch to time how long it takes from the moment you click the ok button to login until the time Windows Query appears.
3) Enable the Access Cache and run the App Engine program to populate the Cache.
4) Perform Step #2 again and compare the times.
Note that if the time in Step #2 is less than 5 seconds, you probably won’t see much improvement as it’s mostly overhead at that point. If you try this on a full Financial Database, you should see the time drop from about 60 seconds to less than 10 seconds.
**********************************************************
The only qualifier on this is that the DBA should only make changes to SQL that modify the access plan, i.e. would be acceptable to carefully reorder Tables in FROM clause or WHERE conditions, but they would need to be very careful to make sure that the actual SQL logic/result set is not affected.
Added code to read the SQL for Accessible Record List from a SQL Object. If the SQL Object is not found, then the hard-coded SQL in C++ is used. The rules are:
1) Look for the de-normalized table for Accessible Record List.
2) If #1 is successful, get the Records using that Table.
3) If #1 is not found or data is not found in #2, look for SQL Object PS_QRYACCRECLIST.
4) If #3 is found, use that SQL for fetching the Record List.
5) If #3 is not found, use the hard-coded SQL.
Added optimizable SQL Objects PSQRYACCLISTBIGSQL and PSQRYACCLISTFASTSQL. The former is for when the Cache is not used, the latter is the Cache access SQL.