Weird performance drop

Поиск
Список
Период
Сортировка
От Vincenzo Romano
Тема Weird performance drop
Дата
Msg-id 200703292056.08459.Vincenzo.Romano@gmail.com
обсуждение исходный текст
Ответы Re: Weird performance drop
Список pgsql-performance
Hi all.

I'm running PostgreSQL v8.1.8 (under Linux Ubuntu).

A function body is written as "language sql stable". There is just a select
for a search in a view with two arguments to do the search. The search is done
with equality comparisons.
Both the function call and the select alone run very fast thanks to the
indexes on the right columns I presume.

Then I create a twin function where part of the comparison is done with
the "like" operator on one of the very same columns as the previous case.
While the function call is very slow, the select alone runs almost as fast
as in the case of equality comparison.

I thought that the query planner usually did a bad job on function bodies
because they'd appear opaque to it.
In this case it seems to me that the body is opaque only if I use the "like"
operator.

Any hint?

--
Vincenzo Romano
----
Maybe Computers will never become as intelligent as Humans.
For sure they won't ever become so stupid. [VR-1987]

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

Предыдущее
От: "dimitri k"
Дата:
Сообщение: Re: Shared buffers, db transactions commited, and write IO on Solaris
Следующее
От: Erik Jones
Дата:
Сообщение: Re: Shared buffers, db transactions commited, and write IO on Solaris