Paulo Jan <admin(at)mail(dot)ddnet(dot)es> writes:
> The problem that I'm having is that the
> search on text fields is too slow,
The only way to make that acceptably fast is to build an index designed
specially for text searches. A simple index will only help for queries
like field = 'foo', not field ~ 'foo'.
The contrib/fti module is one possible approach (a rather inelegant one,
but a lot of people are using it). In 7.2 there will be a new
contrib/tsearch module that is allegedly better, though I haven't
played with it myself. If fti seems too grotty you might want to
download the new 7.2 beta release to try out.
regards, tom lane