Re: Function performance drops during execution of loop

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Seref Arikan <serefarikan(at)kurumsalteknoloji(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Function performance drops during execution of loop
Date: 2014-05-21 15:52:00
Message-ID: 2040.1400687520@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Seref Arikan <serefarikan(at)kurumsalteknoloji(dot)com> writes:
> What may be building up here? I suspect deleting all rows from the temp
> tables is not really deleting them since this is all happening in a
> transaction, but it is my uneducated guess only.

I suspect you suspect correctly. Autovacuum does not touch temp tables,
so it won't help you deal with deleted tuples. Given the usage pattern
you're describing, I think that using a TRUNCATE rather than
delete-all-the-rows would help ... but if you're already doing that,
we need more info.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Seref Arikan 2014-05-21 16:06:39 Re: Function performance drops during execution of loop
Previous Message Seref Arikan 2014-05-21 15:42:55 Function performance drops during execution of loop