We have a dataset using Custom SQL. There is an incremental update scheduled everyday with a look back window of 2 days.
The underlying databse is mySQL.
The incremental refresh generally takes 1 to 2 minutes to complete. A database upgrade was done in our AWS instance and post that update this incremental refresh has started taking 56 minutes with no change in the dataset.
We captured the query that QuickSight triggers. The filter condition for the look back window seems to confuse the optimizer and though the end result is that we only get the incremetal records but one of the main tables involved in the sql is going through a full table scan
This is the filter criteria and this causes the query to run 56 minutes
WHERE flight_date > CONVERT_TZ(DATE_ADD(FROM_UNIXTIME(0), INTERVAL cast(cast(1716521445603 as char(10)) as decimal) SECOND), @@session.time_zone,‘UTC’)
When I produce the expression for look back window with the literal value the query returns in 90 seconds
WHERE flight_date > > ‘2024-05-24 03:30:45’
Has anyone encountered a similar issue in the past? Any workarounds/solution to overcome this issue?
Hi @Giridhar.Prabhu,
It’s been awhile since we last heard from you; checking back in to see if you have any additional questions regarding your original topic or was Naveed’s response helpful?
If we do not hear back from you within the next 3 business days, I’ll mark the solution.