Re: Esta es la estrucutra de las tablas.....

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "Yasset Perez Riverol" <yasset(dot)perez(at)biocomp(dot)cigb(dot)edu(dot)cu>
Cc: "Silvio Quadri" <silvioq(at)gmail(dot)com>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Esta es la estrucutra de las tablas.....
Date: 2008-01-29 00:09:09
Message-ID: c2d9e70e0801281609l26333c0bhe5dc9fa0a19ef067@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Jan 28, 2008 11:55 AM, Yasset Perez Riverol
<yasset(dot)perez(at)biocomp(dot)cigb(dot)edu(dot)cu> wrote:
>
> > 2008/1/28, Yasset Perez Riverol <yasset(dot)perez(at)biocomp(dot)cigb(dot)edu(dot)cu>:
> > > Despues del VACUMM:
> > >
> > > EXPLAIN select tabla1.id, tabla2.id from tabla1 INNER JOIN tabla3 ON
> > > (tabla3.id_tabla1 = tabla1.id) INNER JOIN tabla2 ON (tabla2.id =
> > > tabla3.id_tabla2);

Si te es posible muestra mejor el EXPLAIN ANALYZE... Por lo general es
mejor copiar y pegar el texto del EXPLAIN ANALYZE a un archivo de
texto y adjuntarlo al mail asi no pierde forma...

> > > QUERY PLAN
> > >
> > > -------------------------------------------------------------------------
> > >------- Hash Join (cost=313052.04..757887.84 rows=2134672 width=96)
> > > Hash Cond: ((tabla3.id_tabla1)::text = (tabla1.id)::text)
> > > -> Hash Join (cost=1.99..289972.69 rows=2134672 width=96)
> > > Hash Cond: ((tabla3.id_tabla2)::text = (tabla2.id)::text)
> > > -> Seq Scan on tabla3 (cost=0.00..232237.53 rows=9703053
> > > width=96)
> > > -> Hash (cost=1.44..1.44 rows=44 width=48)
> > > -> Seq Scan on tabla2 (cost=0.00..1.44 rows=44 width=48)
> > > -> Hash (cost=195175.69..195175.69 rows=5412669 width=48)
> > > -> Seq Scan on tabla1 (cost=0.00..195175.69 rows=5412669
> > > width=48)
> > > (9 rows)
> > >

creaste el indice en tabla3.id_tabla2?

despues de crearlo ejecuta ANALYZE tabla3;

--
Atentamente,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Gabriel Hermes Colina Zambra 2008-01-29 00:14:13 Re: Esta es la estrucutra de las tablas.....
Previous Message Gabriel Hermes Colina Zambra 2008-01-29 00:08:53 Re: [OT] Sugerencia para los administradores de la lista