Re: again on index usage (7.1.3) - Mailing list pgsql-hackers

From Daniel Kalchev
Subject Re: again on index usage (7.1.3)
Date
Msg-id 200202121636.SAA01108@dcave.digsys.bg
Whole thread Raw
In response to Re: again on index usage (7.1.3)  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: again on index usage (7.1.3)  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
>>>Stephan Szabo said:> > Let's start with the standard set of things.  Have you vacuum analyzed,> what does explain
showfor the query, is there one value that is more> common than all others?> 
 

My most recent 'standard' answer these days is "it worked well before VACUUM 
ANALYZE" :-)

RADIUS=# explain
select * from attrib where user_name = 'Paacons'RADIUS-# ;
NOTICE:  QUERY PLAN:

Seq Scan on attrib  (cost=0.00..16978.46 rows=17922 width=48)

EXPLAIN

is what explain says by default.

RADIUS=# set enable_seqscan='off';
SET VARIABLE

RADIUS=# explain
select * from attrib where user_name = 'Paacons';
NOTICE:  QUERY PLAN:

Index Scan using uattr on attrib  (cost=0.00..32861.00 rows=17922 width=48)

EXPLAIN

Daniel



pgsql-hackers by date:

Previous
From: Daniel Kalchev
Date:
Subject: Re: again on index usage (7.1.3)
Next
From: Stephan Szabo
Date:
Subject: Re: again on index usage (7.1.3)