Problem with indicies...

From: "Andy Farrell" <Andy_Farrell(at)itd(dot)sterling(dot)com>
To: "PostGreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Problem with indicies...
Date: 1998-11-03 18:20:49
Message-ID: n1302005168.20358@itd.sterling.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

REGARDING Problem with indicies...

I'm having trouble getting indicies to be used when performing various
"covered" queries.

For example see the following table, index and query.

CREATE TABLE JDSFTRATT
(
ATT_CODE char(3),
DS_ID int,
FTR_ID int,
ATT_VALUE float,
ATT_TEXT varchar(128) )
;

create index jdsftratt_b_ds_id_ftr_id
on jdsftratt
using btree (ds_id int4_ops, ftr_id int4_ops, att_code char4_ops, att_value
float8_ops);

select ftr_id from jdsftratt;

As per the explain command, a "Seq Scan" (see explain command output below)
is being performed by postgres for the above query. Also, why would
sequential scan be performed by postgres given a select count(*) on and
indexed table?

explain select ftr_id from jdsftratt;

Seq Scan on jdsftratt (cost=90889.78 size=2134660 width=4)

I have verified that the index exists via querying the system tables. I'm
using postgres 6.3.2 on Sun Ultra 10 running Solaris. Any help would be
appreciated on this.

Andy

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-11-03 21:29:10 Warning!!
Previous Message D'Arcy J.M. Cain 1998-11-03 16:57:36 Re: [HACKERS] A small problem with the new inet and cidr typesg