Re: UDF in C slow
От
Alban Hertroys
Тема
Re: UDF in C slow
Дата
Msg-id
CAF-3MvNt+9yd0VvDnXTV5Y3gNERgZUPtd0HCFk=xRvCijLfFVA@mail.gmail.com
Ответ на
UDF in C slow (Inanc Seylan)
Список
Дерево обсуждения
UDF in C slow Inanc Seylan <inanc.seylan@gmail.com>
Re: UDF in C slow Alban Hertroys <haramrae@gmail.com>
Re: UDF in C slow Inanc Seylan <inanc.seylan@gmail.com>
Re: UDF in C slow Tom Lane <tgl@sss.pgh.pa.us>
Re: UDF in C slow Inanc Seylan <inanc.seylan@gmail.com>
On 11 May 2012 15:57, Inanc Seylan wrote: > 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? Is that a VOLATILE, STABLE or IMMUTABLE function? What's the output of EXPLAIN ANALYZE? -- If you can't see the forest for the trees, Cut the trees and you'll see there is no forest.
В списке pgsql-general по дате отправления