Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group