From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Jan Ploski <jpljpl(at)gmx(dot)de> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL: YMMV? |
Date: | 2001-06-25 19:40:55 |
Message-ID: | Pine.LNX.4.30.0106252136070.724-100000@peter.localdomain |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jan Ploski writes:
> I did a little private MySQL (3.23.28) vs PostgreSQL (7.1r1) benchmark.
> I heard about MySQL's problems with locking/concurrency. So I expected
> that my code would highlight them. It did not. It revealed a problem (?)
> with PostgreSQL, however. Here is how it all went:
>
> The code is written in Java. 10 writer threads and 20 reader threads
> are started. Each thread inserts or selects 500 rows in a loop from
> this table (selects are done on random id's, no indices involved):
Did they all use the same Connection object?
> CREATE TABLE bench (
> id int4 DEFAULT nextval('bench_id_seq'),
> body text NOT NULL,
> subject varchar(255) NOT NULL,
> fld1 varchar(80) NOT NULL,
> fld2 varchar(80) NOT NULL,
> fld3 varchar(80) NOT NULL,
> fld4 varchar(80) NOT NULL,
> fld5 varchar(80) NULL,
> fld6 varchar(80) NULL,
> fld7 int2 NOT NULL,
> fld8 int2 NULL,
> PRIMARY KEY(id) )
That sure looks like an index right there. I don't know if MySQL creates
an index for primary keys, but it might explain a performance drop for
INSERTs.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter
From | Date | Subject | |
---|---|---|---|
Next Message | Thalis A. Kalfigopoulos | 2001-06-25 19:41:27 | Pg uses non-unique index instead of pkey index |
Previous Message | wsheldah | 2001-06-25 19:39:49 | Re: It's Apache, not PostgreSQL |