Re: Merge Join chooses very slow index scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Merge Join chooses very slow index scan
Дата
Msg-id 31348.1426777106@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Merge Join chooses very slow index scan  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
I wrote:
> [ assorted possible workarounds ]

Actually, an easy fix might be to create a 2-column index on
usagestats(type, tid).  I think the planner should be able to
use that to produce sorted output for the mergejoin, and you'd
get the best of both worlds, because the indexscan will stop
immediately when it's exhausted the rows with type = 'vehicle'.

            regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Merge Join chooses very slow index scan
Следующее
От: Jake Magner
Дата:
Сообщение: Re: Merge Join chooses very slow index scan