Re: Adding nextval() to a select caused hang/very slow execution
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Adding nextval() to a select caused hang/very slow execution |
| Дата | |
| Msg-id | 1322417.1604524589@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Adding nextval() to a select caused hang/very slow execution (Eric Raskin <eraskin@paslists.com>) |
| Ответы |
Re: Adding nextval() to a select caused hang/very slow execution
|
| Список | pgsql-performance |
Eric Raskin <eraskin@paslists.com> writes:
> So, things get even weirder. When I execute each individual select
> statement I am generating from a psql prompt, they all finish very
> quickly.
> If I execute them inside a pl/pgsql block, the second one hangs.
> Is there something about execution inside a pl/pgsql block that is
> different from the psql command line?
Generic vs specific plan, perhaps? Are you passing any parameter
values in from plpgql variables?
IIRC, you could force the matter by using EXECUTE, though it's
somewhat more notationally tedious. In late-model PG versions,
plan_cache_mode could help you too.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера