From: admin <admin@wtbwts.com>
To: pgsql-sql@postgresql.org
Subject: can't seem to use index
Date: Sun, 9 Jan 2000 21:33:31 +0000 (GMT)
Message-ID: <Pine.BSF.4.10.10001092128100.49372-100000@server.b0x.com> (raw)
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
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: admin@wtbwts.com
Subject: Re: can't seem to use index
In-Reply-To: <Pine.BSF.4.10.10001092128100.49372-100000@server.b0x.com>
References: <Pine.BSF.4.10.10001092128100.49372-100000@server.b0x.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