Perfomance in comparism

From: Ralf Kramer <rk(at)belisar(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: Perfomance in comparism
Date: 2004-11-22 02:00:14
Message-ID: 41A1482E.2080803@belisar.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi there,

I am playing with some databases, in order find one that is more
satisfying then MySQL.
I have installed now Firebird, MySQL and Postgresql and executed some
simple queries on a
bigger table with approx 180.000 records. The results appear a bit
strange to me:

MySQL
=======================Timer=======================
time to execute is 1.85630297661 sec
=======================/Timer=======================

Firebird
=======================Timer=======================
time to execute is 0.131076097488 sec
=======================/Timer=======================

Postgres
=======================Timer=======================
time to execute is 13.9053928852 sec
=======================/Timer=======================

The query is simply:
SELECT
*
FROM
\"user\"
WHERE
lastname = 'Müller'
AND
gender = 'male'

On the field lastname is an index: CREATE INDEX lastname_index ON "user"
USING btree (lastname)
The query is executed subsequently to a reboot, thus, no chaching
features apply on this queries. But
even when I run the query a second time I get this strange results.

MySQL
=======================Timer=======================
time to execute is 0.0577750205994 sec
=======================/Timer=======================

start Firebird
=======================Timer=======================
time to execute is 0.00465512275696 sec
=======================/Timer=======================

Postgres
=======================Timer=======================
time to execute is 0.209079027176 sec
=======================/Timer=======================

I am absolutely new to Postgres and there is certainly one mistake in my
test environment, but have no clue what this can be.
Any help will appreciated ;-)

I am running the 7.4 Release on a Suse Linux 8.2 and a 2.2 GHz CPU...
The connection is done by Unix Sockets or smth:
$conn_string = "dbname=test user=ralf password=secret***";
$dbh = pg_connect ($conn_string);

TIA
/Ralf

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ramesh Patel 2004-11-22 06:48:20 Postgresql Configuration
Previous Message Michael Fuhr 2004-11-21 18:03:46 Re: Trigger output to file.