Perfomance in comparism

Поиск
Список
Период
Сортировка
От Ralf Kramer
Тема Perfomance in comparism
Дата
Msg-id 41A1482E.2080803@belisar.de
обсуждение исходный текст
Ответы Re: Perfomance in comparism  (Marek Lewczuk <newsy@lewczuk.com>)
Список 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





В списке pgsql-novice по дате отправления:

Предыдущее
От: sarlav kumar
Дата:
Сообщение: automated mail from Arinbe!??!
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: automated mail from Arinbe!??!