Speed comparison to Oracle. Why was this query slower on pgsql?

From: Francisco Reyes <lists(at)natserv(dot)com>
To: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Speed comparison to Oracle. Why was this query slower on pgsql?
Date: 2002-02-22 18:53:40
Message-ID: 20020222134233.M86656-100000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have been instructed to "learn Oracle" by my boss.
among the firs things I am doing is trying to get a feeling for speed.
For instance I have a query like:

select field1, count(*) from mytable group by field1;

On postgresql it takes about 15 seconds while on Oracle it took about 10
seconds.

I thought maybe it was due to disks, but I did a couple of other queries
which would also do a table scan and postgresql actually seemed faster.
For instance I did another query like:

select field1, field2 from mytable where field1 between 1930 and
1940;

The both were very fast, but it seemed the PostgreSQL was slightly faster
every time.

Is Oracle better at aggregate functions?
Another point worth mentioning. The Oracle table has 40K records less.
Postgresql has 770K, Oracld has 730K.

I am pushing for using PostgreSQL for reporting and my boss seems to be
agreeing so far. So I hope we will continue using PostgreSQL no matter what, but I am trying
to learn what types of things each does better than the other.

Is there any resource which compares pgsql to other major DBMS in terms of
their strenghts and weaknesses?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-02-22 19:18:09 Re: Dump Problem
Previous Message Jan Wieck 2002-02-22 18:48:31 Re: number of connections to postmaster