Re: ORDER BY ... LIMIT and JOIN

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: ORDER BY ... LIMIT and JOIN
Дата
Msg-id 603c8f070908091830o69cc4889ua37ccc7dc2b1ab04@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ORDER BY ... LIMIT and JOIN  (Fizu <Fizu@advancedsl.com.ar>)
Список pgsql-performance
On Sun, Aug 9, 2009 at 3:26 PM, Fizu<Fizu@advancedsl.com.ar> wrote:
>               ->  Index Scan using country_ranking_user_idx on "user"
>  (cost=0.00..4807.25 rows=1710 width=143) (actual
> time=20.923..4898.931 rows=1972 loops=1)
>                     Index Cond: (country_id = 5)

An index scan that picks up 1972 rows is taking 5 seconds?  I think
there must be something wrong with this index.  Is it possible that
since you apparently weren't analyzing this database, that maybe you
didn't vacuum it either?  If so, you should probably do a VACUUM FULL
on your database and then a database-wide REINDEX, but at a minimum
you should try reindexing this particular index.

...Robert

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

Предыдущее
От: Michael Andreen
Дата:
Сообщение: Re: ORDER BY ... LIMIT and JOIN
Следующее
От: Ip Wing Kin John
Дата:
Сообщение: Re: Bottleneck?