Technique #4: eliminating DW computed fields calling user functions that have ESQL

If the computed fields in the DataWindow call user functions that have embedded SQLs, for each DataWindow record, the application will need to do a complete round-trip to execute those embedded SQLs. For the PowerBuilder native client/server application, a complete round-trip is "from app to DB"; while for the PowerServer installable cloud application, a complete round-trip is "from app to PowerServer then to DB". Due to the three-tier architecture of the PowerServer installable cloud application, if there are lots of DataWindow records, the performance impact may become significant and noticeable.

To avoid any potential impact, please try the workarounds below:

  • Workaround 1: Change the DataWindow SQL to join related tables to get data directly.

  • Workaround 2: Retrieve all required data to a DataStore and modify the user function to get data from the DataStore instead of from the database.