Hi,
I am looking at query_plan_profile - finding place where query spent most time.
It appears, there are quite a few rather large values for runtime_interval column, slightly bigger than -10957 days. You can see them right here:
select running_time
from query_plan_profiles
where running_time is not null
and running_time < '-10000'::interval;
-10956 23:51:05.141894
-10956 23:37:53.243389
-10956 23:37:50.560545
-10956 23:51:05.297616
-10956 23:48:04.284543
-10956 23:37:50.513517
-10956 23:51:04.907482
Rest of values looks OK, either NULL or small interval like it should be.
Can you ask around, what is wrong with runtime_interval in query_plan_profiles. I am on v 12.0.4.
I resorted to
case when running_time < '-100'::interval then running_time + '10957'::interval else running_time end running_time,
that seems to be working.
Thank you
Sergey