Re: cpu_tuple_cost WRONG -> After an "analyze" or "vacuum full" indexes are not used anymore!!!

From: "Gaetano Mendola" <gmendola(at)mm(dot)eutelsat(dot)org>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: cpu_tuple_cost WRONG -> After an "analyze" or "vacuum full" indexes are not used anymore!!!
Date: 2002-07-29 08:18:37
Message-ID: 016101c236d8$89eb4bd0$1aadd6c2@GMENDOLA2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> A saner way of tweaking the index-vs-seqscan costs is to reduce
> random_page_cost a little --- the default is 4.0 which may be on the
> high side. (But don't push it below 1.0.)

So I tried:

# explain select * from to_del where col2 = 30;
NOTICE: QUERY PLAN:

Seq Scan on to_del (cost=0.00..8281.25 rows=4443 width=8)

for obtain an index scan I set random_page_cost = 2.8;
with 2.9 the choose was still the sequenzial scan.

# set random_page_cost = 2.8;
SET VARIABLE
# explain select * from to_del where col2 = 30;
NOTICE: QUERY PLAN:

Index Scan using idx_col2 on to_del (cost=0.00..7953.95 rows=4443 width=8)

EXPLAIN

4.0 -> 2.8 is not so a little or not ?

Ciao
Gaetano

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Gaetano Mendola 2002-07-29 08:21:55 Re: cpu_tuple_cost WRONG -> After an "analyze" or "vacuum full" indexes are not used anymore!!!
Previous Message Jarek Jarzebowski 2002-07-29 06:31:14 Configuration tip.