How to optimize a view with dynamic pivot that takes too long when calling it with filter
I have a view call that takes 30 minutes when I’m calling the view like select * from PIVOTED_DATA where local_datetime>= '2024-06-13 00:00 and local_datetime<= '2024-06-13 01:00
, but if inside a query I set that condition, takes only 11 seconds.