Обсуждение: Is retrieval by OID a special case?

Поиск
Список
Период
Сортировка

Is retrieval by OID a special case?

От
Tom Lane
Дата:
(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