explain plan

From: rudy <rudy(at)heymax(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: explain plan
Date: 2001-01-30 19:50:48
Message-ID: 3A771B18.A5826279@heymax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Running Red Hat 7.0 kernel 2.2.16
PostgreSQL 7.0.3

skyy=# create unique index article_pkey on article (id_article);
CREATE
skyy=# explain select id_article from article where id_article = 21;
NOTICE: QUERY PLAN:

Seq Scan on article (cost=0.00..1.61 rows=1 width=8)

EXPLAIN
skyy=# vacuum analyze article;
VACUUM
skyy=# explain select id_article from article where id_article = 21;
NOTICE: QUERY PLAN:

Seq Scan on article (cost=0.00..1.61 rows=1 width=8)

EXPLAIN
skyy=#

This table has 20,000 records. What am I doing wrong? Why doesn't it use
the Index I created? Is there something I need to enable, why wouldn't
it choose an index over a seq scan with more than 20,000 rows to scan?

Thanks In Advance,

Rudy Laczkovich

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sebastian Mirolo 2001-01-31 01:07:09 Starting postmaster error
Previous Message Andrew McMillan 2001-01-30 19:20:25 Re: truncated numeric data