Re: Optimizing the same PREPAREd static query (without parameters)
| От | Mitar |
|---|---|
| Тема | Re: Optimizing the same PREPAREd static query (without parameters) |
| Дата | |
| Msg-id | CAKLmikMPAZHJRON5CUviVysDvaiSQeOduWjCbUC2G89Shs=r+A@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Optimizing the same PREPAREd static query (without parameters) (David Rowley <david.rowley@2ndquadrant.com>) |
| Ответы |
Re: Optimizing the same PREPAREd static query (without parameters)
|
| Список | pgsql-general |
Hi! On Mon, Jan 7, 2019 at 12:09 AM David Rowley <david.rowley@2ndquadrant.com> wrote: > On Mon, 7 Jan 2019 at 18:54, Mitar <mmitar@gmail.com> wrote: > > If I have a PREPAREd query without parameters (static) and I EXECUTE > > it repeatedly in the same session, does PostgreSQL learn/optimize > > anything across those runs? > > Yes, it will generate the query plan on the first invocation of > EXECUTE and use that plan for all subsequent EXECUTEs for the session > until you DEALLOCATE the prepared query or DISCARD PLANS/ALL; So this sounds more like no? So the same plan is used, so PostgreSQL is not further optimizing the plan based on any statistics or anything? Mitar -- http://mitar.tnode.com/ https://twitter.com/mitar_m
В списке pgsql-general по дате отправления: