Re: Index Backward Scan fast / Index Scan slow ! (Modifié par Pailloncy Jean-Gérard)

Поиск
Список
Период
Сортировка
От Pailloncy Jean-Gérard
Тема Re: Index Backward Scan fast / Index Scan slow ! (Modifié par Pailloncy Jean-Gérard)
Дата
Msg-id 1D4DEBDC-8CB4-11D8-80FD-000A95DE2550@ifrance.com
обсуждение исходный текст
Ответы Re: Re: Index Backward Scan fast / Index Scan slow ! (Modifié par Pailloncy Jean-Gérard)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Hi,

> In 7.4 a VACUUM should be sufficient ... or at least, if it isn't
Atfer VACUUM:
dps=# explain analyze select next_index_time from url order by
next_index_time desc limit 1;

QUERY PLAN
------------------------------------------------------------------------
------------------------------------------------------------------------
--
  Limit  (cost=0.00..2.62 rows=1 width=4) (actual time=0.098..0.099
rows=1 loops=1)
    ->  Index Scan Backward using url_next_index_time on url
(cost=0.00..814591.03 rows=310913 width=4) (actual time=0.096..0.096
rows=1 loops=1)
  Total runtime: 0.195 ms
(3 rows)

dps=# explain analyze select next_index_time from url order by
next_index_time asc limit 1;

QUERY PLAN
------------------------------------------------------------------------
------------------------------------------------------------------------
-
  Limit  (cost=0.00..2.62 rows=1 width=4) (actual
time=13504.105..13504.106 rows=1 loops=1)
    ->  Index Scan using url_next_index_time on url
(cost=0.00..814591.03 rows=310913 width=4) (actual
time=13504.099..13504.099 rows=1 loops=1)
  Total runtime: 13504.158 ms
(3 rows)

Better, but......

Cordialement,
Jean-Gérard Pailloncy


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

Предыдущее
От: Pailloncy Jean-Gérard
Дата:
Сообщение: Re: Index Backward Scan fast / Index Scan slow !
Следующее
От: "Jeremy Dunn"
Дата:
Сообщение: Re: index v. seqscan for certain values