From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | mgainty(at)hotmail(dot)com |
Cc: | Matthew Pulis <mpulis(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Improving the timing of a query |
Date: | 2007-12-07 17:44:41 |
Message-ID: | 20071207174441.GE2878@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Dec 07, 2007 at 12:07:52PM -0500, mgainty(at)hotmail(dot)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(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Harrison | 2007-12-07 17:49:54 | Re: Replication using WAL files |
Previous Message | Bob Pawley | 2007-12-07 17:38:26 | pg_dump |