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

From: Eric Ridge <ebr(at)tcdi(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: User Defined Functions/AM's inherently slow?
Date: 2004-01-18 04:06:31
Message-ID: B273A48B-496B-11D8-B3E7-000A95BB5944@tcdi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jan 17, 2004, at 10:22 PM, Tom Lane wrote:

> Eric Ridge <ebr(at)tcdi(dot)com> writes:
>> I've created a stub AM that literally does nothing.
>
> It's not possible for an index AM to "do nothing", at least not for an
> indexscan. It has to return tuple pointers. What are you doing for
> that?

I should have included the entire explain output:

stub AM:
Index Scan using idxa_stub on test2 (cost=0.00..2.68 rows=1 width=5)
(actual time=0.002..0.002 rows=0 loops=1)
Index Cond: (a ==> '1'::text)
Total runtime: 0.247 ms

builtin btree AM:
Index Scan using idxa_btree on test2 (cost=0.00..4.68 rows=1 width=5)
(actual time=0.024..0.026 rows=1 loops=1)
Index Cond: (a = '1'::text)
Total runtime: 0.060 ms

If the "actual time" numbers are really a measure of the amount of time
spent in (at least) the index, it seems the stub should report a
smaller "total runtime", but alas, it doesn't.

eric

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-01-18 04:27:56 Re: User Defined Functions/AM's inherently slow?
Previous Message Eric Ridge 2004-01-18 03:45:37 Re: User Defined Functions/AM's inherently slow?