Re: ctid access is slow - Mailing list pgsql-general

From Ilja Golshtein
Subject Re: ctid access is slow
Date
Msg-id 430B24F7.000003.06520@colgate.yandex.ru
Whole thread Raw
In response to Re: ctid access is slow  (Robert Treat <xzilla@users.sourceforge.net>)
Responses Re: ctid access is slow  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List 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

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: Import File
Next
From: Bruno Wolff III
Date:
Subject: Re: Where to get 8.1 beta test version?