Buenas
Pela descricao, parece que estao faltando indices nessas suas tabelas.
Atenciosamente
Luiz Rafael Culik Guimaraes
Suporte Xharbour
www.xharbour.com.br
Thu, 27 Mar 2008 20:07:12 -0400, "Giuliani Deon Sanches" <[EMAIL PROTECTED]>
escreveu:
> Executei um VACUUM ANALYZE antes dos EXPLAIN ANALYZE para postar para vocês.
> Apenas uma adendo ao que foi discutido: O desenvolvedor desse sistema
> garante que se eu colocar um fedora ou ubuntu o resultado vai ser bem
> mais rápido. Sinceramente não sei qual a influência mas em pesquisas
> pelo google achei algumas referências sobre lentidão do pgsql no slack
> e um bom funcionamento dele em fedora/ubuntu. Segue os comandos
> executados e resultados, deixando claro que o banco é o mesmo, com a
> mesma qtde de registros sendo que agora o do server linux tem um
> VACUUM ANALYZE a seu favor:
>
> ==========
> COMANDOS
> ==========
> [27/03/2008 20:37:08] - Transacao 0: BEGIN
> [27/03/2008 20:37:08] - T0 {
> SELECT id FROM tabemp
> WHERE cod = 1;}
>
> [27/03/2008 20:37:08] - Transacao 0: COMMIT [69 ms]
> [27/03/2008 20:37:08] - Transacao 1: BEGIN
> [27/03/2008 20:37:08] - T1 {
> SELECT * FROM tabemp
> WHERE id = '1';}
>
> [27/03/2008 20:37:08] - T1 {
> SELECT * FROM ctbestplc
> WHERE id = '001/001/1';}
>
> [27/03/2008 20:37:08] - Transacao 1: COMMIT [285 ms]
> [27/03/2008 20:37:08] - Transacao 5: BEGIN
> [27/03/2008 20:37:08] - T5 {
> SELECT * FROM tabuni
> WHERE id = '001/1';}
>
> [27/03/2008 20:37:08] - Transacao 5: COMMIT [55 ms]
> [27/03/2008 20:37:11] - Transacao 7: BEGIN
> [27/03/2008 20:37:11] - T7 {
> SELECT * FROM tabuni
> WHERE id = '001/1';}
>
> [27/03/2008 20:37:11] - Transacao 7: COMMIT [282 ms]
>
>
> =========================
> EXPLAIN ANALYZE
> =========================
> BEGIN
> QUERY PLAN
> ------------------------------------------------------------------------------------------------
> Seq Scan on tabemp (cost=0.00..1.01 rows=1 width=2) (actual
> time=0.013..0.014 rows=1 loops=1)
> Filter: (cod = 1)
> Total runtime: 0.086 ms
> (3 rows)
>
> COMMIT
> BEGIN
> QUERY PLAN
> --------------------------------------------------------------------------------------------------
> Seq Scan on tabemp (cost=0.00..1.01 rows=1 width=432) (actual
> time=0.011..0.012 rows=1 loops=1)
> Filter: ((id)::text = '1'::text)
> Total runtime: 0.067 ms
> (3 rows)
>
> COMMIT
> BEGIN
> QUERY PLAN
> ----------------------------------------------------------------------------------------------------
> Seq Scan on ctbestplc (cost=0.00..1.01 rows=1 width=79) (actual
> time=0.013..0.014 rows=1 loops=1)
> Filter: ((id)::text = '001/001/1'::text)
> Total runtime: 0.042 ms
> (3 rows)
>
> COMMIT
> BEGIN
> QUERY PLAN
> --------------------------------------------------------------------------------------------------
> Seq Scan on tabemp (cost=0.00..1.01 rows=1 width=432) (actual
> time=0.010..0.011 rows=1 loops=1)
> Filter: ((id)::text = '1'::text)
> Total runtime: 0.056 ms
> (3 rows)
>
> id | dt_inc | id_usu_inc | dt_alt |
> id_usu_alt | id_emp | cod | nome | estrutura |
> gerar_cod_red | proximo_codigo_gerado
> -----------+---------------------+------------+---------------------+------------+--------+-----+---------------------+-----------+---------------+-----------------------
> 001/001/1 | 2008-02-06 14:30:55 | 001/1 | 2008-02-06 14:30:55 |
> 001/1 | 1 | 101 | PLANO PADRAO MERITO | 111222 |
> 1 | 220
> (1 row)
>
> COMMIT
> BEGIN
> QUERY PLAN
> --------------------------------------------------------------------------------------------------
> Seq Scan on tabuni (cost=0.00..1.01 rows=1 width=767) (actual
> time=0.016..0.017 rows=1 loops=1)
> Filter: ((id)::text = '001/1'::text)
> Total runtime: 0.126 ms
> (3 rows)
>
> COMMIT
> BEGIN
> QUERY PLAN
> --------------------------------------------------------------------------------------------------
> Seq Scan on tabuni (cost=0.00..1.01 rows=1 width=767) (actual
> time=0.010..0.011 rows=1 loops=1)
> Filter: ((id)::text = '001/1'::text)
> Total runtime: 0.079 ms
> (3 rows)
>
> COMMIT
>
> 2008/3/27, Osvaldo Rosario Kussama <[EMAIL PROTECTED]>:
> > Joao escreveu:
> >
> > > rode um vaccum no teu slack!!!!
> > > Podem ter muitas dead pages!!
> >
> >
> >
> >
> > Ou, melhor ainda, um VACUUM ANALYZE pois as estatísticas - utilizadas
> > pelo planejador - podem estar desatualizadas.
> >
> >
> > Osvaldo
> >
> > _______________________________________________
> > pgbr-geral mailing list
> > [email protected]
> > https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
> >
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>
>
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral