can't seem to use index

From: admin <admin(at)wtbwts(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: can't seem to use index
Date: 2000-01-09 22:37:43
Message-ID: Pine.BSF.4.10.10001092237130.50154-100000@server.b0x.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to use an index on a varchar(32) field, but explain keeps
retuning a sequential scan. This is my table and index:

CREATE TABLE manufacturer (
id int2,
name varchar(32)
);

CREATE INDEX manu_name_idx ON "manufacturer" using btree ( "name"
"text_ops" );

Both my table and index have been created successfully, and the database
has been vacuumed. Then I run the following query from the psql
command-line:
explain select * from manufacturer where name='3COM';

... and I get a sequential scan! What gives?

Any suggestions would be greatly appreciated,
Marc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 2000-01-09 23:28:02 Searching http://www.postgresql.org ...
Previous Message Dustin Sallings 2000-01-09 10:38:18 Re: [GENERAL] Transfer data to another server