Re: Adding nextval() to a select caused hang/very slow execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Raskin <eraskin@xxxxxxxxxxxx> 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





[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux