Re: what does "initplan" operation in explain output mean?
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: what does "initplan" operation in explain output mean? |
| Дата | |
| Msg-id | 4572.1280671706@sss.pgh.pa.us обсуждение |
| Ответ на | what does "initplan" operation in explain output mean? (Mark Rostron <mrostron@ql2.com>) |
| Ответы |
Re: what does "initplan" operation in explain output
mean?
|
| Список | pgsql-performance |
Mark Rostron <mrostron@ql2.com> writes:
> This message is a request for information about the "initplan" operation in explain plan.
An initplan is a sub-SELECT that only needs to be executed once because it
has no dependency on the immediately surrounding query level. The cases
you show here are from sub-SELECTs like this:
(select min(wu_id) from work_active limit 1)
which yields a value that's independent of anything in the outer query.
If there were an outer reference in there, you'd get a SubPlan instead,
because the subquery would need to be done over again for each row of
the outer query.
BTW, adding LIMIT 1 to an aggregate query is pretty pointless.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера