From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Koen Antonissen <Koen@Cee-Kay.net>
Cc: Richard Poole <richard.poole@vi.net>
Cc: bernd <bernd@matrixware.at>
Cc: pgsql-sql@postgresql.org
Subject: RE: primary key scans in sequence
Date: Wed, 30 May 2001 10:46:24 -0700 (PDT)
Message-ID: <Pine.BSF.4.21.0105301044300.6432-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <DD782DD61CF86144BD78DDC89D3D6124017020@gaea.home.dutchcentral.net>
On Wed, 30 May 2001, Koen Antonissen wrote:
> Now this one doesn't:
> Table "teams"
> Attribute | Type | Modifier
> -----------+---------+--------------------------------------------------
> id | integer | not null default nextval('teams_id_seq'::text)
> name | text | not null
> mgr_name | text |
> address | text |
> zipcode | text |
> city | text |
> country | text |
> email | text |
> telnr | text |
> mobnr | text |
> faxnr | text |
> logo | text | not null default 'images/teams/logo_default.gif'
> movie | text |
> url | text |
> qoute | text |
> active | boolean | default 't'::bool
> Indices: index_teams_id, <=!!! 'my own' index
> index_teams_name,
> teams_pkey, <=normal pkey index
> unq_teams_name
>
> NOTICE: QUERY PLAN:
>
> Seq Scan on teams (cost=0.00..1.09 rows=1 width=173)
Looking at that cost, I have to wonder, how many rows are in the table
and has vacuum analyze been run on it? If the number of rows in the
table is small, the seq scan is definately better than having to read
from both the index and heap.
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: sszabo@megazone23.bigpanda.com, Koen@Cee-Kay.net, richard.poole@vi.net, bernd@matrixware.at
Subject: Re: primary key scans in sequence
In-Reply-To: <Pine.BSF.4.21.0105301044300.6432-100000@megazone23.bigpanda.com>
References: <DD782DD61CF86144BD78DDC89D3D6124017020@gaea.home.dutchcentral.net> <Pine.BSF.4.21.0105301044300.6432-100000@megazone23.bigpanda.com>
* 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