Optimizing grouping by removing read triggers

For queries involving physical files or tables with read triggers, group by triggers will always involve a temporary file before the group by processing, and will therefore slow down these queries.

Note: Read triggers are added when the Add Physical File Trigger (ADDPFTRG) command has been used on the table with TRGTIME (*AFTER) and TRGEVENT (*READ).

The query will run faster is the read trigger is removed (RMVPFTRG TRGTIME (*AFTER) TRGEVENT (*READ)).

Related information
Add Physical File Trigger (ADDPFTRG) command