function call vs staright query

Поиск
Список
Период
Сортировка
От Vincenzo Romano
Тема function call vs staright query
Дата
Msg-id 200703180750.54703.Vincenzo.Romano@gmail.com
обсуждение исходный текст
Ответы Re: function call vs staright query  (Vincenzo Romano <vincenzo.romano@gmail.com>)
Список pgsql-performance
Hi all.

I'm experiencing a strange behaviour with 8.1.8 (cannot do upgrades to 8.2 at
the moment).

On a 13+ million rows table I can do a query with results back in less than
100 ms. Result is a set of bigint.
But when I encapsulate that query into an "SQL" function with three parameters
the results come back in about one minute. The function contains just the same
query as above.
Of course there's been no change in indices or even into the table itself
between the two tests.

I'm almost sure I'm missing something, but have no clue about what!
Any hint?

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

Предыдущее
От: "hubert depesz lubaczewski"
Дата:
Сообщение: Re: Postgres batch write very slow - what to do
Следующее
От: Vincenzo Romano
Дата:
Сообщение: Re: function call vs staright query