UDF in C slow

From: Inanc Seylan <inanc(dot)seylan(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: UDF in C slow
Date: 2012-05-11 13:57:14
Message-ID: 4FAD1ABA.9050806@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I have implemented a user-defined function in C that returns a boolean
value after some computation. Now I have a query Q such that when I
specify the function in the WHERE clause of Q, Q runs in 40 secs and if
I don't use the function it runs in 4 secs. Then I thought that my
implementation of this function could be slow; so I decided to write a
very simple function that just returns true without any computation. To
my surprise, it also takes around 40 seconds to run Q with the new very
simple function. Does anybody have a clue about what might be going wrong?

Cheers,

Inanc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Filip Rembiałkowski 2012-05-11 14:09:46 avoiding CONTEXT messages
Previous Message Simon Riggs 2012-05-11 10:26:14 Re: Why is RELEASE SAVEPOINT sometimes slow?