Eric Ridge <[EMAIL PROTECTED]> 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
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html