Re: ctid access is slow

From: "Ilja Golshtein" <ilejn(at)yandex(dot)ru>
To: xzilla(at)users(dot)sourceforge(dot)net
Cc: pgsql-general(at)postgresql(dot)org, ilejn(at)yandex(dot)ru
Subject: Re: ctid access is slow
Date: 2005-08-23 13:30:31
Message-ID: 430B24F7.000003.06520@colgate.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

>> Could anybody help me with this [artificial] query
>>
>> select ctid from aaa where ctid in (select ctid from aaa limit 10);

[skipped]

>I think using an indexed field would probably be faster for you, especially >if you have a PK on the table.

I used to think ctid is the same as rowid in Oracle,
where rowid access is the fastest. Is it wrong?
After all, why oid is faster then ctid?

I consider using index of course. I just cannot
believe it is the best what I can do here.

>Barring that, make sure you have
>vacuumed/analyzed and send us explain analyze output.

I played with fresh database.

server version is 8.0.3, enable_tidscan is on,
looks like hints have no effect.

Thanks.

--
Best regards
Ilja Golshtein

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-08-23 13:47:40 Re: ctid access is slow
Previous Message Robert Treat 2005-08-23 13:15:42 Re: ctid access is slow