Re: BUG #16183: PREPARED STATEMENT slowed down by jit
От | Jeff Janes |
---|---|
Тема | Re: BUG #16183: PREPARED STATEMENT slowed down by jit |
Дата | |
Msg-id | CAMkU=1yApeBH0ajaAPa35sD7t==LY=YmACcXXOGG18GwqzNung@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #16183: PREPARED STATEMENT slowed down by jit (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #16183: PREPARED STATEMENT slowed down by jit
|
Список | pgsql-bugs |
The update tool (osm2pgsql) makes heavy use of PREPARED statements. Could
there be a bug in jit+PREPARED causing the statement to be recompiled on
each execute ?
I don't think that that is a bug, rather it is just how JIT works at the moment (that it is recompiled for each execution). That might be improved in a future version.
For the slow down to be 10x though does seem rather extreme. Could you isolate the query and post an execution with "EXPLAIN (ANALYZE)"? I suspect it is a very cheap query (e.g. a single-row update), but for some reason the planner thinks it is expensive, and so JIT kicks in when it shouldn't. Because of the high overhead, JIT is only supposed to activate for expensive queries, see jit_above_cost.
Cheers,
Jeff
В списке pgsql-bugs по дате отправления: