Re: Improving the timing of a query

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Improving the timing of a query
Дата
Msg-id 20071207174441.GE2878@svana.org
обсуждение исходный текст
Ответ на Re: Improving the timing of a query  (mgainty@hotmail.com)
Ответы Re: Improving the timing of a query  ("Matthew Pulis" <mpulis@gmail.com>)
Список pgsql-general
On Fri, Dec 07, 2007 at 12:07:52PM -0500, mgainty@hotmail.com wrote:
> other DB's do FTS when there is a function involved in the predicate (WHERE
> clause)
> so a possible workaround would be to look at all function calls in your
> predicate (WHERE clause) and
> populate a new column with the results of the function(column)
> and then create and populate an index which will reference the
> function(column)

You don't need to create a column, yu can create functional indexes in
postgres:

CREATE INDEX foo ON bar ((myfunction(column)));

And it can be used anytime your query says: WHERE myfunction(column) = X

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

Вложения

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

Предыдущее
От: Howard Cole
Дата:
Сообщение: Killing a session in windows
Следующее
От: Bob Pawley
Дата:
Сообщение: pg_dump