Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.8.8/8.7.5) with ESMTP id OAA05056 for ; Thu, 9 Jul 1998 14:59:29 -0400 (EDT) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id OAA02820 for ; Thu, 9 Jul 1998 14:58:39 -0400 (EDT) To: pgsql-sql@postgresql.org Subject: Is retrieval by OID a special case? Date: Thu, 09 Jul 1998 14:58:39 -0400 Message-ID: <2817.900010719@sss.pgh.pa.us> From: 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