Performance aggregates - Mailing list pgsql-general

From snpe
Subject Performance aggregates
Date
Msg-id 01051514401600.01497@spnew
Whole thread Raw
In response to How to save images in a table.  ("Stuart Foster" <stuart@opnix.com>)
Responses Re: Performance aggregates  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Performance aggregates  (snpe <snpe@infosky.net>)
List 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

pgsql-general by date:

Previous
From: Diana Cionoiu
Date:
Subject: Re: trailing spaces
Next
From: "Matus \"fantomas\" Uhlar"
Date:
Subject: asynchronour queries and result testing