From: Tyler Durden <tylersticky@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Seq Scan
Date: Fri, 1 Jun 2007 17:48:56 +0100
Message-ID: <ab07320e0706010948m7c4eb1b8s9cdaf79b1c400125@mail.gmail.com> (raw)
Hi,
I'm having some problems in performance in a simple select count(id)
from.... I have 700 000 records in one table, and when I do:
# explain select (id) from table_name;
-[ RECORD 1 ]----------------------------------------------------------------
QUERY PLAN | Seq Scan on table_name (cost=0.00..8601.30 rows=266730 width=4)
I had created an index for id(btree), but still shows "Seq Scan".
What I'm doing wrong?
Thanks,
Tyler
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-performance@postgresql.org
Cc: tylersticky@gmail.com
Subject: Re: Seq Scan
In-Reply-To: <ab07320e0706010948m7c4eb1b8s9cdaf79b1c400125@mail.gmail.com>
References: <ab07320e0706010948m7c4eb1b8s9cdaf79b1c400125@mail.gmail.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