Re: Simple join doesn't use index

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Simple join doesn't use index
Дата
Msg-id CAMkU=1z9tGDWcf0kdR3_HAzXaSGfqe_=apw+ZysXsOfsJxdOHw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Simple join doesn't use index  (Alex Vinnik <alvinnik.g@gmail.com>)
Ответы Re: Simple join doesn't use index  (Alex Vinnik <alvinnik.g@gmail.com>)
Список pgsql-performance
On Mon, Jan 28, 2013 at 3:43 PM, Alex Vinnik <alvinnik.g@gmail.com> wrote:
> It sure turned out that default settings are not a good fit. Setting
> random_page_cost to 1.0 made query to run in 2.6 seconds and I clearly see
> that indexes are being used in explain plan and IO utilization is close to
> 0.
>
> QUERY PLAN
> Sort  (cost=969787.23..970288.67 rows=200575 width=8) (actual
> time=2176.045..2418.162 rows=241238 loops=1)
>   Sort Key: visits.id, views.id
>   Sort Method: external sort  Disk: 4248kB

What query are you running?  The query you originally showed us should
not be doing this sort in the first place.

Cheers,

Jeff


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Simple join doesn't use index
Следующее
От: Alex Vinnik
Дата:
Сообщение: Re: Simple join doesn't use index