Re: Wich hardware suits best for large full-text indexed databases

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "Diogo Biazus" <diogo(at)ikono(dot)com(dot)br>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Wich hardware suits best for large full-text indexed databases
Date: 2004-03-30 22:39:52
Message-ID: D90A5A6C612A39408103E6ECDD77B8299CA97A@voyager.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can we see the schema for the table qrydocumentos ?

-----Original Message-----
From: Diogo Biazus [mailto:diogo(at)ikono(dot)com(dot)br]
Sent: Tuesday, March 30, 2004 2:32 PM
To: Dann Corbit
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Wich hardware suits best for large full-text
indexed databases

Dann Corbit wrote:
What does the EXPLAIN command say about the slowest queries?

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;

QUERY PLAN
------------------------------------------------------------------------
------------------------------------------------------------------------
---------------------
Sort (cost=1270.87..1271.60 rows=293 width=880)
Sort Key: ajustadata(documentos.datapublicacao),
ajustahora(documentos.horapublicacao), documentos.coddocumento
-> Hash Join (cost=1246.88..1258.87 rows=293 width=880)
Hash Cond: ("outer".codfonte = "inner".codfonte)
-> Merge Join (cost=1245.38..1252.25 rows=293 width=861)
Merge Cond: (("outer".codfonte = "inner".codfonte) AND
("outer".codtipodocumento = "inner".codtipodocumento))
-> Sort (cost=1195.00..1195.73 rows=291 width=845)
Sort Key: documentos.codfonte,
documentos.codtipodocumento
-> Index Scan using documentos_conteudo_stem_ix_ix
on documentos (cost=0.00..1183.08 rows=291 width=845)
Index Cond: (conteudo_stem_ix @@
'\'brasil\''::tsquery)
Filter: (conteudo_stem_ix @@
'\'brasil\''::tsquery)
-> Sort (cost=50.38..50.89 rows=204 width=16)
Sort Key: fontes_gruposusuario.codfonte,
tiposdocumento_gruposusuario.codtipodocumento
-> Merge Join (cost=0.00..42.57 rows=204
width=16)
Merge Cond: ("outer".codgrupousuario =
"inner".codgrupousuario)
-> Index Scan using
fontes_gruposusuario_codgrupousuario_ix on fontes_gruposusuario
(cost=0.00..24.75 rows=28 width=8)
Index Cond: (codgrupousuario = 1)
-> Index Scan using
tiposdocumento_gruposusuario_codgrupousuario_ix on
tiposdocumento_gruposusuario (cost=0.00..13.85 rows=542 width=8)
-> Hash (cost=1.40..1.40 rows=40 width=19)
-> Seq Scan on fontes (cost=0.00..1.40 rows=40
width=19)

--
Diogo Biazus
diogo(at)ikono(dot)com(dot)br
http://www.ikono.com.br

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2004-03-30 22:53:02 Re: Best open source db poll currently
Previous Message Diogo Biazus 2004-03-30 22:31:36 Re: Wich hardware suits best for large full-text indexed