Facing performance issue with a query on gl_periods and per_calendar_events tables.
On Fusion ERP I have a BIP report with complex query which involvers among others GL_PERIODS and PER_CALENDAR_EVENTS tables.
Report parameters are GL Period From and GL Period to - providing a selection of the period range to the end user.
When user selects same Period from and period to, i.e., a single period query returns data immediately. But when user selects more than one period for the query, the report exceeds scheduled job's 30 minute of the time limit. It happens for even 2 periods.
To find cause of the issue, I started rebuilding the query step by step and a simple query which includes only GL_PERIDOS and PER_CALENDAR_EVENTS table a issue can be reproduced. I need to keep the queries in the format "With …. …. …. - SELECT" to match the complex queries requirement.