Is retrieval by OID a special case? - Mailing list pgsql-sql

From Tom Lane
Subject Is retrieval by OID a special case?
Date
Msg-id 2817.900010719@sss.pgh.pa.us
Whole thread Raw
List pgsql-sql
(I'm just full of questions today...)

"EXPLAIN" claims that selecting on OID is done via brute force search:

tgl=> explain select * from markettransactionlog where oid = 176276;
NOTICE:  QUERY PLAN:
Seq Scan on markettransactionlog  (cost=1045.32 size=1 width=57)

but when you actually do it, it is far faster than an ordinary
sequential-scan retrieval.

I would imagine that retrieving by OID has to be special-cased somehow
(don't indexes use OIDs to refer to the tuples in the underlying
table?).  Is EXPLAIN failing to describe this operation properly,
or is my understanding all wet?

            regards, tom lane

pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [SQL] Single vs. multiple indexes
Next
From: Lorenzo Huerta
Date:
Subject: unique indices...