sequence scan on PK

From: Jeroen van Iddekinge <iddekingej(at)lycos(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: sequence scan on PK
Date: 2005-05-08 14:59:13
Message-ID: 427E2941.9070105@lycos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

I understand that when a table contains only a few rows it is better to
do a sequence scan than an index scan. But is this also for a table with
99 records?

A table contains
id integer (primary key)
name varchar(70)
parent integer
comment text
owner integer
inheritAccess integer
defaultAccess integer
sequence bigint
contentsinheritaccessmove integer
contentsinheritaccessadd integer

explain select * from tblFolders where id=90;
QUERY PLAN
-----------------------------------------------------------
Seq Scan on tblfolders (cost=0.00..3.24 rows=1 width=50)
Filter: (id = 90)

(I have analyze table bit still a sequence scan).

With how manys rows it is ok to do an index scan or sequence scan? How
is this calculated in pg?

Regards
Jer

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Matteo Beccati 2005-05-08 16:18:46 Re: sequence scan on PK
Previous Message John A Meinel 2005-05-08 13:44:28 Re: sequence scan on PK