Re: Ayuda con Explain de consulta

From: "Luis Guevara" <luis(dot)a(dot)guevara(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: PostgreSQL-foro <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Ayuda con Explain de consulta
Date: 2007-05-29 12:49:55
Message-ID: fa2b6e3a0705290549k3fb66d4fy6a0d436a7b5606ed@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Las tablas si tienen los índices en sus respectivos PK y FK

¿ Alguien puede traducirme este explain ?
¿cuál es la solución?

Gracias

On 5/24/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
>
> Luis Guevara escribió:
>
> > select a.plem_id
> > from planilla_empleado_movimiento a
> > left join planilla_empleado b using (plem_id)
> > where b.plan_id=388
>
> > QUERY PLAN
> > Hash Join (cost=10115.59..195262.73 rows=112620 width=4) (actual time=
> > 2205.884..3482.227 rows=138918 loops=1)
> > Hash Cond: (a.plem_id = b.plem_id)
> > -> Seq Scan on planilla_empleado_movimiento a
> > (cost=0.00..159788.89rows=1384689 width=4) (actual time=
> > 0.036..2733.052 rows=1384690 loops=1)
> > -> Hash (cost=10101.01..10101.01 rows=5829 width=4) (actual time=
> > 15.907..15.907 rows=6893 loops=1)
> > -> Index Scan using planilla_empleado_idx1 on planilla_empleado
> b
> > (cost=0.00..10101.01 rows=5829 width=4) (actual time=0.098..11.105rows=6893
> > loops=1)
> > Index Cond: (plan_id = 388)
> > Total runtime: 3522.568 ms
>
> Hay indice en planilla_empleado_movimiento.plem_id?
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>

--
atte.
Luis Guevara

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message mauricio lay 2007-05-29 12:57:48 comienzo en postgresql
Previous Message Miguel Rodríguez Penabad 2007-05-29 07:52:52 Re: fecha actual