Re: DUDA EXPLAIN - base datos 240GB

From: "Andrea" <andrea(at)compesa(dot)com(dot)br>
To: "Jaime Casanova" <systemguards(at)gmail(dot)com>
Cc: "lista postgresql-espanhol" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: DUDA EXPLAIN - base datos 240GB
Date: 2006-08-23 15:57:37
Message-ID: 008f01c6c6cc$db204130$f20a640a@ddm67838
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Jaime,

Gracías por la respuesta.
Como usted ha sugerido yo hice el:
explain select distinct
y el retorno esta abajo.

Andrea Pereira
DBA-Compesa
Recife-Brasil

--------------------------------------------------------------------------------

QUERY PLAN
Unique (cost=661255.97..661256.07 rows=2 width=128)
-> Sort (cost=661255.97..661255.98 rows=2 width=128)
Sort Key: imovel.imov_id, imovel.imov_qteconomia, imovel.imov_dscomplementoendereco, imovel.imov_nnimovel, imovel.imov_icimovelcondominio, imovel.imov_nnmorador, imovel.imov_idimovelcondominio, imovel.imov_idimovelprincipal, imovel.imov_nnpontosutilizacao, imovel.imov_nnlote, imovel.imov_nnsublote, imovel.imov_nnareaconstruida, imovel.imov_voreservatorioinferior, imovel.imov_voreservatoriosuperior, imovel.imov_vopiscina, cliente.clie_id, cliente_imovel.crtp_id, imovel_perfil.iper_dsimovelperfil
-> Nested Loop (cost=177120.07..661255.96 rows=2 width=128)
-> Index Scan using cliente_pkey on cliente (cost=0.00..5.14 rows=1 width=4)
Index Cond: (clie_id = 1216255)
-> Hash Join (cost=177120.07..661250.80 rows=2 width=128)
" Hash Cond: (""outer"".imov_id = ""inner"".imov_id)"
-> Hash Left Join (cost=177117.04..652767.76 rows=1695997 width=124)
" Hash Cond: (""outer"".clie_id = ""inner"".clie_id)"
-> Hash Left Join (cost=94891.44..456605.23 rows=1695997 width=128)
" Hash Cond: (""outer"".imov_id = ""inner"".imov_id)"
-> Hash Left Join (cost=44439.00..292162.86 rows=1695997 width=124)
" Hash Cond: (""outer"".iper_id = ""inner"".iper_id)"
-> Hash Join (cost=44437.94..266721.84 rows=1695997 width=115)
" Hash Cond: (""outer"".imov_id = ""inner"".imov_id)"
-> Seq Scan on imovel (cost=0.00..120299.96 rows=1695997 width=111)
Filter: (imov_icexclusao = 2)
-> Hash (cost=31679.95..31679.95 rows=1727995 width=4)
-> Seq Scan on imovel_subcategoria imovelsubcategoria (cost=0.00..31679.95 rows=1727995 width=4)
-> Hash (cost=1.05..1.05 rows=5 width=17)
-> Seq Scan on imovel_perfil (cost=0.00..1.05 rows=5 width=17)
-> Hash (cost=35967.75..35967.75 rows=1961875 width=8)
-> Seq Scan on cliente_imovel cliente_imovel_usuario (cost=0.00..35967.75 rows=1961875 width=8)
-> Hash (cost=67820.88..67820.88 rows=1951088 width=4)
-> Seq Scan on cliente cliente_usuario (cost=0.00..67820.88 rows=1951088 width=4)
-> Hash (cost=3.03..3.03 rows=2 width=12)
-> Index Scan using xix1_cliente_imovel on cliente_imovel (cost=0.00..3.03 rows=2 width=12)
Index Cond: (1216255 = clie_id)
Filter: (clim_dtrelacaofim IS NULL)
----- Original Message -----
From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "Andrea" <andrea(at)compesa(dot)com(dot)br>
Cc: "lista postgresql-espanhol" <pgsql-es-ayuda(at)postgresql(dot)org>
Sent: Wednesday, August 23, 2006 12:33 PM
Subject: Re: [pgsql-es-ayuda] DUDA EXPLAIN - base datos 240GB

On 8/23/06, Andrea <andrea(at)compesa(dot)com(dot)br> wrote:
> Perdón, pero sigo sin saber como analisar el retorno de EXPLAIN.
> Gracias Mariano por el material, todavia no he dicho nada sobre el uso de
> Hash Tables, Sort, Merge....
> Mira el retorno de mi comando EXPLAIN abajo que yo no sé analisar.
>

Un EXPLAIN no te dice mucho en realidad usa EXPLAIN ANALYZE mejor y
vuelvelo a postear...

--
Atentamente,
Jaime Casanova

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message obed 2006-08-23 16:02:24 Re: pg_ctl solo como root
Previous Message Alvaro Herrera 2006-08-23 15:51:36 Re: DUDA EXPLAIN - base datos 240GB