Thanks for your suggestions :)

Even though the ideas are good, the function is working really fast now,
1.5-2seconds which is quite enough I guess :)

This is how the function is at the moment :
http://yancho.pastebin.com/d236fd97f

Sorry I forgot to update this thread :(

On 12/7/07, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote:
>
> On Fri, Dec 07, 2007 at 12:07:52PM -0500, [EMAIL PROTECTED] 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   <[EMAIL PROTECTED]>   http://svana.org/kleptog/
> > Those who make peaceful revolution impossible will make violent
> revolution inevitable.
> >  -- John F Kennedy
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFHWYaJIB7bNG8LQkwRAmOyAJ92ZtXFiQfme/Rn2+2ylISrR3YM+ACfTWO8
> ftUieOQhrQCQy+rBAElRr68=
> =ALYk
> -----END PGP SIGNATURE-----
>
>


-- 
Matthew Pulis
URL : http://www.solutions-lab.net
MSN : [EMAIL PROTECTED]
ICQ : 145951110
Skype : solutions-lab.net

Reply via email to