Performance aggregates

From: snpe <snpe(at)infosky(dot)net>
To: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Performance aggregates
Date: 2001-05-15 12:40:16
Message-ID: 01051514401600.01497@spnew
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have 2 tables :

CREATE TABLE e_kalkn (
id INT4 NOT NULL,
roba VARCHAR(6) NOT NULL,
dat DATE NOT NULL,
datv DATE NOT NULL,
val VARCHAR(3) NOT NULL,
kod VARCHAR(3) NOT NULL,
tb VARCHAR(2) NOT NULL,
ts VARCHAR(2) NOT NULL,
dob VARCHAR(6),
status VARCHAR(1)
);
CREATE TABLE e_kalkns (
id INT4 NOT NULL,
redbr INT NOT NULL,
osn NUMERIC(30,6),
proc NUMERIC(30,6),
izn NUMERIC(30,6)
);

and indexes :

create unique index e_kalkn_id on e_kalkn(id);
create index e_kalkns_id on e_kalkns(id);

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.

Regards

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matus "fantomas" Uhlar 2001-05-15 12:48:21 asynchronour queries and result testing
Previous Message Justin Clift 2001-05-15 12:23:59 Re: trailing spaces