Re: Performance aggregates

From: snpe <snpe(at)infosky(dot)net>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: PostgreSQL-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Performance aggregates
Date: 2001-05-15 18:59:19
Message-ID: 01051520591903.01497@spnew
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message snpe 2001-05-15 19:00:02 Re: Performance aggregates
Previous Message Tom Lane 2001-05-15 18:22:18 Re: Re: Re: What's the best front end/client under MS Windows?