Indexes not used

D. Duccini <duccini@backpack.com>

From: "D. Duccini" <duccini@backpack.com>
To: Pgsql-novice <pgsql-novice@postgreSQL.org>
Date: 2001-03-15T20:03:00Z
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@backpack.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!"   
-----------------------------------------------------------------------------