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

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: cpu_tuple_cost WRONG -> After an "analyze" or "vacuum full" indexes are not used anymore!!!
Дата
Msg-id 016e01c236d9$00515ad0$1aadd6c2@GMENDOLA2
обсуждение исходный текст
Ответ на cpu_tuple_cost WRONG -> After an "analyze" or "vacuum full" indexes are not used anymore!!!  ("Gaetano Mendola" <mendola@bigfoot.com>)
Список pgsql-admin
From: "Tom Lane" <tgl@sss.pgh.pa.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


В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: cpu_tuple_cost WRONG -> After an "analyze" or "vacuum full" indexes are not used anymore!!!
Следующее
От: "Tahira Aslam"
Дата:
Сообщение: Could not connect to remote socket