When database queries on your Pega instance are taking longer to execute then expected a PEGA0005 alert will appear ( DB query taking long time). The first step we do to resolve the issue is running tracer. However running tracer slows down the system further. The other alternative is to get the query from the clipboard and run the query directly on the DB and manually check the behavior. However, forming the query from tracer/clipboard is a cumbersome task because we have to manually replace the unknown parameter field that appears as "?" with the SQL inserts. This process is not only time consuming, but it is also error prone.
This component is provided as an activity rule developed with an aim to help engineers and developers extract the complete query for a report definition which DBA can be ran directly in the database. It can save loads of time while debugging report related slowness issues.