Function runtime increases after 5 calls in the same session.

From: "Ilya I(dot) Ashchepkov" <koctep(at)gmail(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Function runtime increases after 5 calls in the same session.
Date: 2014-10-21 09:53:16
Message-ID: CALgmQD9ebXKPgbK5jjbaJ9kCWtOywjjpv-X9+eN0hn5gfGJOjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, all.

I wrote a function and during testing it I came across the strange
behaviour.
Function runtime is about 200ms first 5 times, 6th and futher calls takes
~22000 ms.
I simplified my schema, you can see it in attached file.
I've tested on 9.4beta3 and 9.3.5.

When I removed security_barrier from the view or alter column "time" type
to integer (bigint, I don't remember) all goes as expected.

It looks very strange for me.
I will be pleased if somebody checks this.

--
С уважением,
Ащепков Илья koctep(at)gmail(dot)com

Attachment Content-Type Size
test.sql application/sql 930 bytes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2014-10-21 10:04:26 Re: Yosemite (OSX 10.0) problems with Postgresql
Previous Message nurul [via PostgreSQL] 2014-10-21 07:02:57 Log-shipping replication in one machine