Re: constant vs function param differs in performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: constant vs function param differs in performance
Дата
Msg-id 5187.1068843554@sss.pgh.pa.us
обсуждение исходный текст
Ответ на constant vs function param differs in performance  ("SZŰCS Gábor" <surrano@mailbox.hu>)
Список pgsql-performance
"=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" <surrano@mailbox.hu> writes:
> I have two SQL function that produce different times and I can't understand
> why.

The planner often produces different plans when there are constants in
WHERE clauses than when there are variables, because it can get more
accurate ideas of how many rows will be retrieved.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Help with count(*)
Следующее
От: "Nick Fankhauser"
Дата:
Сообщение: n_distinct way off, but following a pattern.