can't seem to use index - Mailing list pgsql-general

From admin
Subject can't seem to use index
Date
Msg-id Pine.BSF.4.10.10001092237130.50154-100000@server.b0x.com
Whole thread Raw
Responses Re: [GENERAL] can't seem to use index  (Aaron Holtz <aholtz@bright.net>)
Re: [GENERAL] can't seem to use index  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Re: [GENERAL] can't seem to use index  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Re: can't seem to use index  (admin <admin@wtbwts.com>)
List 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



pgsql-general by date:

Previous
From: Ed Loehr
Date:
Subject: Re: [GENERAL] Re: referential integrity (fwd)
Next
From: Aaron Holtz
Date:
Subject: Re: [GENERAL] can't seem to use index