Re: LIMIT confuses the planner

От: Tom Lane
Тема: Re: LIMIT confuses the planner
Дата: ,
Msg-id: 3562.1235401789@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: LIMIT confuses the planner  (Robert Haas)
Ответы: Re: LIMIT confuses the planner  (Kouber Saparev)
Список: pgsql-performance

Скрыть дерево обсуждения

LIMIT confuses the planner  (Kouber Saparev, )
 Re: LIMIT confuses the planner  (Richard Huxton, )
  Re: LIMIT confuses the planner  (Kouber Saparev, )
   Re: LIMIT confuses the planner  (Tom Lane, )
    Re: LIMIT confuses the planner  (Kouber Saparev, )
     Re: LIMIT confuses the planner  (Tom Lane, )
      Re: LIMIT confuses the planner  (marcin mank, )
       Re: LIMIT confuses the planner  (marcin mank, )
       Re: LIMIT confuses the planner  (Tom Lane, )
      Re: LIMIT confuses the planner  (Kouber Saparev, )
 Re: LIMIT confuses the planner  (Robert Haas, )
  Re: LIMIT confuses the planner  (Tom Lane, )
   Re: LIMIT confuses the planner  (Kouber Saparev, )

Robert Haas <> writes:
> If you left seq_page_cost (which isn't mentioned here) at the default
> value but reduced random_page_cost to 0.1, then you have
> random_page_cost < seq_page_cost.  That's probably Bad.

... well, it's certainly going to push the planner to believe indexscans
are cheaper than sorts no matter what.

The previously noted rowcount estimation problem might be a bigger issue
in this particular case, but I agree this is a Bad Idea.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: david@lang.hm
Дата:
Сообщение: Re: postgreSQL performance 8.2.6 vs 8.3.3
От: Tom Lane
Дата:
Сообщение: Re: TCP network cost