Re: Queries within a function
От | Mridula Mahadevan |
---|---|
Тема | Re: Queries within a function |
Дата | |
Msg-id | 0A59BA5B590B7E4A8D441196A9F17E904C68825D30@corpmail11.calpurnia.com обсуждение исходный текст |
Ответ на | Re: Queries within a function (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-performance |
Tom, I cannot run execute because all these are temp tables with drop on auto commit within a function. This should have somethingto do with running it in a transaction, when I run them in autocommit mode (without a drop on autocommit) the queriesreturn in a few seconds. -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Tuesday, February 02, 2010 11:28 AM To: Mridula Mahadevan Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Queries within a function Mridula Mahadevan <mmahadevan@stratify.com> writes: > I am running a bunch of queries within a function, creating some temp tables and populating them. When the data exceedssay, 100k the queries start getting really slow and timeout (30 min). when these are run outside of a transaction(inauto commit mode), they run in a few seconds. Any ideas on what may be going on and any postgresql.conf parametersetc that might help? I'll bet the function is caching query plans that stop being appropriate once the table grows in size. You might have to resort to using EXECUTE, although if you're on 8.4 DISCARD PLANS ought to help too. regards, tom lane
В списке pgsql-performance по дате отправления: