Re: planner question re index vs seqscan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: planner question re index vs seqscan
Дата
Msg-id 9205.961195708@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: planner question re index vs seqscan  (Ed Loehr <eloehr@austin.rr.com>)
Список pgsql-hackers
Ed Loehr <eloehr@austin.rr.com> writes:
> But I'm still wondering why it is still doing a seq scan on the
> "ahrn.activity_id = a.id" part when both of those integer columns are
> indexed??

Presumably because it thinks the hash join is cheaper than a nestloop
or merge join would be ... although that seems kinda surprising.  What
plans do you get if you try various combinations ofset enable_hashjoin = off;set enable_mergejoin = off;set
enable_nestloop= off;
 
How do the cost estimates compare against the actual runtimes for
doing the query each way?
        regards, tom lane


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

Предыдущее
От: darcy@druid.net (D'Arcy J.M. Cain)
Дата:
Сообщение: Re: Changes to functions and triggers
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: Big 7.1 open items