pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
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> (raw)

(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



Message-ID: <2817.900010719@sss.pgh.pa.us>
Permalink:  ../2817.900010719@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2817.900010719@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: Is retrieval by OID a special case?
  In-Reply-To: <2817.900010719@sss.pgh.pa.us>
  References: <2817.900010719@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox