Diogo,Alright, here it goes:
could you send us 'explain analyze' for fts-specific part of your query ? For example,
eyeknow=# explain analyze select * from documentos where conteudo_stem_ix @@ to_tsquery('default_portuguese', 'brasil');
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using documentos_conteudo_stem_ix_ix on documentos (cost=0.00..1183.08 rows=291 width=1156) (actual time=26.33..840039.40 rows=70686 loops=1)
Index Cond: (conteudo_stem_ix @@ '\'brasil\''::tsquery)
Filter: (conteudo_stem_ix @@ '\'brasil\''::tsquery)
Total runtime: 840248.91 msec
(4 rows)
I'm trying to find documents which contain the word 'brasil' (stemmed).Frankly, I don't understand your query :) Could you explain what do you want to find ?
qrydocumentos.conteudo_stem_ix @@ to_tsquery('default_portuguese', 'brasil')
This is just an example, because the user can input any query to the database.
The rest of the query is used to make sure that the user is accessing only documents he has permission to.
Regards,
-- Diogo Biazus diogo@ikono.com.br http://www.ikono.com.br
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly