Indexes not used

From: "D(dot) Duccini" <duccini(at)backpack(dot)com>
To: Pgsql-novice <pgsql-novice(at)postgreSQL(dot)org>
Subject: Indexes not used
Date: 2001-03-15 20:03:00
Message-ID: Pine.GSO.4.03.10103151358260.626-100000@ra.bpsi.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Just upgraded from 6.5.3, on solaris

and i'm noticing that indexes are not being used by default

IE: if i have a table

Table "radusage"
Attribute | Type | Modifier
-----------+-------------+----------
datetime | timestamp | not null
account | varchar(64) |
usage | integer |
sent | integer |
recv | integer |
ip | bigint |
host | bigint |
port | smallint |
Indices: idxradaccount,
idxraddate,
idxradoid

and index idxradaccount is

# \d idxradaccount
Index "idxradaccount"
Attribute | Type
-----------+-------------
account | varchar(64)
btree

how come it doesn't use it if i

# explain select * from radusage where account = 'someuser';
NOTICE: QUERY PLAN:

Seq Scan on radusage (cost=0.00..13839.67 rows=5757 width=50)

EXPLAIN

????????????????

-----------------------------------------------------------------------------
david(at)backpack(dot)com BackPack Software, Inc. www.backpack.com
+1 651.645.7550 voice "Life is an Adventure.
+1 651.645.9798 fax Don't forget your BackPack!"
-----------------------------------------------------------------------------

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-03-15 20:27:38 Re: Indexes not used
Previous Message Chuck Kimber 2001-03-15 16:28:59 RE: perl problems