Re: speed of querry?

Список
Период
Сортировка
От Tom Lane
Тема Re: speed of querry?
Дата
Msg-id 8324.1113604689@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: speed of querry?  ("Joel Fradkin")
Список pgsql-performance
Дерево обсуждения
speed of querry?  ("Joel Fradkin", )
 Re: speed of querry?  (Richard Huxton, )
  Re: speed of querry?  ("Joel Fradkin", )
  Re: speed of querry?  (Tom Lane, )
   Re: speed of querry?  ("Joel Fradkin", )
    Re: speed of querry?  (Dawid Kuroczko, )
     Re: speed of querry?  ("Joel Fradkin", )
      Re: speed of querry?  (Dawid Kuroczko, )
       Re: speed of querry?  (Tom Lane, )
        Re: speed of querry?  ("Joel Fradkin", )
         Re: speed of querry?  ("Joel Fradkin", )
 Re: speed of querry?  ("Dave Held", )
  Re: speed of querry?  ("Joel Fradkin", )
   Re: speed of querry?  (Tom Lane, )
    Re: speed of querry?  ("Joel Fradkin", )
     Re: speed of querry?  (Tom Lane, )
 Re: speed of querry?  ("Dave Page", )
  Re: speed of querry?  ("Joel Fradkin", )
"Joel Fradkin" <> writes:
> Turning off merg joins seems to of done it but what do I need to do so I am
> not telling the system explicitly not to use them, I must be missing some
> setting?

> "  ->  Hash Left Join  (cost=185.57..226218.77 rows=177236 width=75) (actual
> time=21.147..2221.098 rows=177041 loops=1)"
> "        Hash Cond: (("outer".jobtitleid = "inner".id) AND
> (("outer".clientnum)::text = ("inner".clientnum)::text))"

It's overestimating the cost of this join for some reason ... and I
think I see why.  It's not accounting for the combined effect of the
two hash clauses, only for the "better" one.  What are the statistics
for tbljobtitle.id and tbljobtitle.clientnum --- how many distinct
values of each, and are the distributions skewed to a few popular values?

            regards, tom lane

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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: Spend 7K *WHERE*? WAS Intel SRCS16 SATA raid? and How
Следующее
От: Ron Mayer
Дата:
Сообщение: Re: Spend 7K *WHERE*? WAS Intel SRCS16 SATA raid? and How