Re: Strange "actual time" in simple CTE

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Strange "actual time" in simple CTE
Дата
Msg-id CAMkU=1zLViLfA=gBdK-+h94TwHLVdqgEWTADkVQ4c5WQEfX=Aw@mail.gmail.com
обсуждение исходный текст
Ответ на Strange "actual time" in simple CTE  (Jean-Christophe Boggio <postgresql@thefreecat.org>)
Список pgsql-performance


On Sat, Dec 2, 2023 at 11:50 AM Jean-Christophe Boggio <postgresql@thefreecat.org> wrote:
Hello,

I am trying to optimize a complex query and while doing some explains, I
stumbled upon this :

   CTE cfg
     ->  Result  (cost=2.02..2.03 rows=1 width=25) (actual
time=7167.478..7167.481 rows=1 loops=1)
...
How can this take 7 seconds?



This really looks like an artefact (maybe in relation to the JIT compiler?)


Exactly.  The time taking to do the JIT compilations gets measured in non-intuitive places in the plan.  I'm guessing that that is what is going on here, especially since the time separately reported at the end of the plan for JIT so closely matches this mysterious time.  Just turn JIT off, I doubt it doing you any good anyway.

Cheers,

Jeff

В списке pgsql-performance по дате отправления:

Предыдущее
От: Jean-Christophe Boggio
Дата:
Сообщение: Strange "actual time" in simple CTE
Следующее
От: Jerry Brenner
Дата:
Сообщение: Does Postgres have consistent identifiers (plan hash value) for explain plans?