Re: User Defined Functions/AM's inherently slow?

Поиск
Список
Период
Сортировка
От Eric Ridge
Тема Re: User Defined Functions/AM's inherently slow?
Дата
Msg-id 83E5131E-496F-11D8-B3E7-000A95BB5944@tcdi.com
обсуждение исходный текст
Ответ на Re: User Defined Functions/AM's inherently slow?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Jan 17, 2004, at 11:27 PM, Tom Lane wrote:

> Eric Ridge <ebr@tcdi.com> writes:
>> costestimate: {
>>     PG_RETURN_VOID();
>> }
>
> This at least needs to set some values into the output parameters ---
> zeroes are okay, not setting them at all isn't.  I'm surprised the
> planner doesn't go nuts.  It looks from your EXPLAIN results like
> the values are coming up zero anyway, but seeing that cost_index()
> doesn't do anything to initialize those local variables, I'd expect
> fairly unpredictable behavior.

I have tried setting them all to zero, and even using the 
backend/utils/adt/selfuncs.c:genericcostestimate() code (it's not 
exported, it seems), but no matter what sane (or crazy!) numbers I 
provide for the cost estimate, the "fact" remains, my AM, which does 
"nothing" is slower than the builtin btree AM.

Could this just be related to the fact that my AM is in a .so, and 
there's just some operating system/C runtime overhead in calling 
functions in dynamically loaded libraries?

eric



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: User Defined Functions/AM's inherently slow?
Следующее
От: Eric Ridge
Дата:
Сообщение: Re: User Defined Functions/AM's inherently slow?