Re: Wich hardware suits best for large full-text indexed - Mailing list pgsql-general

From Teodor Sigaev
Subject Re: Wich hardware suits best for large full-text indexed
Date
Msg-id 406A70CA.1040602@sigaev.ru
Whole thread Raw
In response to Re: Wich hardware suits best for large full-text indexed  (Diogo Biazus <diogo@ikono.com.br>)
Responses Re: Wich hardware suits best for large full-text indexed
List pgsql-general
> explain SELECT qrydocumentos.coddocumento, qrydocumentos.nomedocumento,
> qrydocumentos.conteudo, qrydocumentos.tamanho, qrydocumentos.hora,
> qrydocumentos.data, qrydocumentos.codfonte, qrydocumentos.nomefonte,
> qrydocumentos.numeroimagens as "numeroImagens", qrydocumentos.subtitulo,
> qrydocumentos.codtipodocumento, qrydocumentos.codformato, numeroacessos
> AS acessos FROM qrydocumentos WHERE qrydocumentos.codgrupousuario = 1
> AND (qrydocumentos.conteudo_stem_ix @@ to_tsquery('default_portuguese',
> 'brasil')) ORDER BY ajustadata(qrydocumentos.datapublicacao) DESC,
> ajustahora(qrydocumentos.horapublicacao) DESC,
> qrydocumentos.coddocumento DESC;

What is distribution of records by codgrupousuario field?
You can use multi-column index (with contrib/btree_gist):
create index fti on qrydocumentos using gist (codgrupousuario, conteudo_stem_ix);
or partial index
create index fti on qrydocumentos using gist (conteudo_stem_ix) where
codgrupousuario = 1;

One more. Let you use ispell dictionary ( I suppose, for Portuguese language,
http://fmg-www.cs.ucla.edu/geoff/ispell-dictionaries.html#Portuguese-dicts )

--
Teodor Sigaev                                  E-mail: teodor@sigaev.ru

pgsql-general by date:

Previous
From: Ericson Smith
Date:
Subject: Re: Large DB
Next
From: "bwhite"
Date:
Subject: Question about rtrees (overleft replacing left in nodes)