Re: Performance aggregates - Mailing list pgsql-general

From snpe
Subject Re: Performance aggregates
Date
Msg-id 01051520591903.01497@spnew
Whole thread Raw
In response to Re: Performance aggregates  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Performance aggregates  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tuesday 15 May 2001 17:28, Stephan Szabo wrote:
> On Tue, 15 May 2001, snpe wrote:
> > Table e_kalkn have 4668 rows and e_kalkns 101170 rows.
> >
> > Query :
> >
> > select roba,sum(izn)
> >  from e_kalkn k,e_kalkns ks
> >  where k.id=ks.id
> >  group by roba
> >  order by roba
> >
> > is 2.5 times faster on one commercial database (there are tests on
> > Internet that say 'Postgresql is faster than that database).
> > I can't say which database it is.
>
> Have you run vacuum analyze (since loading the data) and what does explain
> show for the query.  Also, what version are you using?

I have run :

vacuumdb --analyze -v -d mytest

I try index on column roba in table e_kalkn, but all is same.

This is explain :
psql:up1:4: NOTICE:  QUERY PLAN:

Aggregate  (cost=11132.18..11286.42 rows=3085 width=32)
  ->  Group  (cost=11132.18..11209.30 rows=30849 width=32)
        ->  Sort  (cost=11132.18..11132.18 rows=30849 width=32)
              ->  Hash Join  (cost=121.35..8831.95 rows=30849 width=32)
                    ->  Seq Scan on e_kalkns ks  (cost=0.00..2041.10
rows=101710 width=16)
                    ->  Hash  (cost=109.68..109.68 rows=4668 width=16)
                          ->  Seq Scan on e_kalkn k  (cost=0.00..109.68
rows=4668 width=16)

EXPLAIN



pgsql-general by date:

Previous
From: snpe
Date:
Subject: Re: Performance aggregates
Next
From: Tom Lane
Date:
Subject: Re: Performance aggregates