Re: [HACKERS] Pg takes at least 2 hours to retrieve 7650 rows - Mailing list pgsql-hackers

From José Soares
Subject Re: [HACKERS] Pg takes at least 2 hours to retrieve 7650 rows
Date
Msg-id 37285B2C.47E5A353@sferacarta.com
Whole thread Raw
In response to Pg takes at least 2 hours to retrieve 7650 rows  (José Soares <jose@sferacarta.com>)
List pgsql-hackers
Vadim Mikheev ha scritto:

> José Soares wrote:
> >
> > $ time psql -f  test.sql  2>/dev/null >/dev/null
> > SELECT movimentazioni.azienda
> > FROM movimentazioni,capi
> > where ((capi.matricola = movimentazioni.matricola )
> > and (capi.specie = movimentazioni.specie ) );
> >
> EXPLAIN ?
>

explain SELECT movimentazioni.azienda
FROM movimentazioni,capi
where ((capi.matricola = movimentazioni.matricola )
and (capi.specie = movimentazioni.specie ) );
NOTICE:  QUERY PLAN:

Hash Join  (cost=1221.38 size=2 width=60) ->  Seq Scan on movimentazioni  (cost=349.64 size=7565 width=36) ->  Hash
(cost=0.00size=0 width=0)       ->  Seq Scan on capi  (cost=335.55 size=7562 width=24)
 

EXPLAIN

>
> > $ time psql -f  test.sql  2>/dev/null >/dev/null
> > SELECT movimentazioni.azienda
> > FROM movimentazioni,capi
> > where (capi.specie = movimentazioni.specie )
> > and ((capi.matricola = movimentazioni.matricola ))
>
> EXPLAIN ?
>
> Vadim

explain SELECT movimentazioni.azienda
FROM movimentazioni,capi
where (capi.specie = movimentazioni.specie )
and ((capi.matricola = movimentazioni.matricola ));
NOTICE:  QUERY PLAN:

Hash Join  (cost=1221.38 size=2 width=60) ->  Seq Scan on movimentazioni  (cost=349.64 size=7565 width=36) ->  Hash
(cost=0.00size=0 width=0)       ->  Seq Scan on capi  (cost=335.55 size=7562 width=24)
 

EXPLAIN




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Current Open Items
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Beta2?