Re: Consulta de query

From: "Mario Soto" <mario_soto(at)venezolanadeavaluos(dot)com>
To: <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: <mario_soto(at)venezolanadeavaluos(dot)com>, <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Consulta de query
Date: 2004-07-04 16:02:43
Message-ID: 41967.200.35.66.77.1088956963.squirrel@mail.venezolanadeavaluos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Hola Alvaro aca esta el explain

QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Nested Loop (cost=3.52..3996.79 rows=4842 width=404)
-> Nested Loop (cost=3.52..3821.95 rows=1 width=377)
Join Filter: (("outer".co_subgrupo =
("inner".co_subgrupo)::numeric) AND ("outer".co_grupo =
"inner".co_grupo) AND ("outer".co_clase = "inner".co_clase) AND
("outer".co_filial = "inner".co_filial) AND ("outer".co_empresa =
"inner".co_empresa))
-> Nested Loop (cost=3.52..3817.43 rows=1 width=623)
Join Filter: ("outer".co_rubro = ("inner".co_rubro)::numeric)
-> Nested Loop (cost=3.52..3811.08 rows=1 width=588)
Join Filter: ("outer".co_cuentamayor =
("inner".co_cuentamayor)::numeric)
-> Nested Loop (cost=3.52..3803.65 rows=1 width=525)
Join Filter: ("outer".co_subcuentamayor =
("inner".co_subcuentamayor)::numeric)
-> Nested Loop (cost=3.52..3797.86 rows=1
width=431)
Join Filter: (("outer".co_cuentadetalle =
("inner".co_cuentadetalle)::numeric) AND
("outer".co_subcuentamayor =
("inner".co_subcuentamayor)::numeric))
-> Nested Loop (cost=3.52..3791.91
rows=1 width=343)
-> Nested Loop
(cost=3.52..3785.86 rows=1
width=228)
Join Filter:
((("outer".co_empresa)::numeric
= "inner".co_empresa) AND
("outer".co_filial =
"inner".co_filial) AND
(("outer".co_clase)::numeric
= "inner".co_clase) AND
(("outer".co_grupo)::numeric
= "inner".co_grupo))
-> Merge Join
(cost=3.52..4.32 rows=1
width=101)
Merge Cond:
(("outer"."?column5?" =
"inner"."?column6?")
AND ("outer".co_filial
= "inner".co_filial)
AND
("outer"."?column6?" =
"inner".co_clase))
-> Sort
(cost=1.23..1.26 rows=9
width=33)
Sort Key:
(clase.co_empresa)::numeric,
clase.co_filial,
(clase.co_clase)::numeric
-> Seq Scan on
clase
(cost=0.00..1.09
rows=9 width=33)
-> Sort
(cost=2.29..2.38
rows=36 width=68)
Sort Key:
(grupo.co_empresa)::numeric,
grupo.co_filial,
grupo.co_clase
-> Seq Scan on
grupo
(cost=0.00..1.36
rows=36 width=68)
-> Seq Scan on activos
(cost=0.00..2931.21
rows=30921 width=127)
-> Index Scan using
subcuentadetalle_pk_cuentadetalle
on subcuentadetalle
(cost=0.00..6.01 rows=1 width=125)
Index Cond:
((subcuentadetalle.co_empresa
=
("outer".co_empresa)::numeric)
AND
(subcuentadetalle.co_filial =
"outer".co_filial) AND
(subcuentadetalle.co_clase =
("outer".co_clase)::numeric)
AND
(subcuentadetalle.co_grupo =
("outer".co_grupo)::numeric)
AND
(subcuentadetalle.co_subgrupo
= "outer".co_subgrupo) AND
(subcuentadetalle.co_rubro =
"outer".co_rubro) AND
(subcuentadetalle.co_cuentamayor
= "outer".co_cuentamayor) AND
(subcuentadetalle.co_subcuentamayor
= "outer".co_subcuentamayor)
AND
(subcuentadetalle.co_cuentadetalle
= "outer".co_cuentadetalle)
AND
(subcuentadetalle.co_subcuentadetalle
=
"outer".co_subcuentadetalle))
-> Index Scan using
cuentadetalle_pk_cuantadetalle on
cuentadetalle (cost=0.00..5.91 rows=1
width=101)
Index Cond:
((cuentadetalle.co_empresa =
("outer".co_empresa)::numeric) AND
(cuentadetalle.co_filial =
"outer".co_filial) AND
(cuentadetalle.co_clase =
("outer".co_clase)::numeric) AND
(cuentadetalle.co_grupo =
("outer".co_grupo)::numeric) AND
("outer".co_subgrupo =
cuentadetalle.co_subgrupo) AND
("outer".co_rubro =
cuentadetalle.co_rubro) AND
("outer".co_cuentamayor =
cuentadetalle.co_cuentamayor))
-> Index Scan using
subcuentamayor_pk_subcuentamayor on
subcuentamayor (cost=0.00..5.76 rows=1
width=110)
Index Cond: ((subcuentamayor.co_empresa =
("outer".co_empresa)::numeric) AND
(subcuentamayor.co_filial =
"outer".co_filial) AND
(subcuentamayor.co_clase =
("outer".co_clase)::numeric) AND
(subcuentamayor.co_grupo =
("outer".co_grupo)::numeric) AND
("outer".co_subgrupo =
subcuentamayor.co_subgrupo) AND
("outer".co_rubro =
subcuentamayor.co_rubro) AND
("outer".co_cuentamayor =
subcuentamayor.co_cuentamayor))
-> Index Scan using cuentamayor_new_pk_cuentamayor
on cuentamayor (cost=0.00..7.38 rows=2 width=97)
Index Cond: ((cuentamayor.co_empresa =
("outer".co_empresa)::numeric) AND
(cuentamayor.co_filial = "outer".co_filial) AND
(cuentamayor.co_clase =
("outer".co_clase)::numeric) AND
(cuentamayor.co_grupo =
("outer".co_grupo)::numeric) AND
("outer".co_subgrupo = cuentamayor.co_subgrupo)
AND ("outer".co_rubro = cuentamayor.co_rubro))
-> Index Scan using rubro_new_pk_rubro on rubro
(cost=0.00..6.31 rows=1 width=89)
Index Cond: ((rubro.co_empresa =
("outer".co_empresa)::numeric) AND (rubro.co_filial =
"outer".co_filial) AND (rubro.co_clase =
("outer".co_clase)::numeric) AND (rubro.co_grupo =
("outer".co_grupo)::numeric) AND ("outer".co_subgrupo
= rubro.co_subgrupo))
-> Seq Scan on subgrupo (cost=0.00..2.72 rows=72 width=94)
-> Seq Scan on samaubi (cost=0.00..126.42 rows=4842 width=27)
(35 filas)

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2004-07-04 16:24:26 Re: Consulta de query
Previous Message Alvaro Herrera 2004-07-04 15:41:47 Re: Consulta de query