Slow report, but same query takes few seconds if run directly on DB
We have a "Search" page which allows users to look for cases using different kind of filters.
When the user clicks on the Search button, after setting the filters, a datapage with a report definition is executed.
In particular, in production we reach the report timeout (10mins) trying to extract with specific filters.
We get the PEGA0005 alert in the alert log and the following exception in the PegaRules.log "ORA-01013: user requested cancel of current operation".
Tracing the execution, substituting parameters and running the same exact query directly on the DB, it takes about 5sec to extract the whole results (about 200 records).
Is there any setting in the Report Definition or in the Database which can help in this case?