Re: Concurrent testing PostgreSQL Vs MySQL

From: "Durai" <visolve_postgres(at)lycos(dot)co(dot)uk>
To: "Shridhar Daithankar" <shridhar_daithankar(at)myrealbox(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Concurrent testing PostgreSQL Vs MySQL
Date: 2003-11-21 10:09:42
Message-ID: 0eff01c3b017$98f9ccf0$1a0110ac@dumco
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Shridhar,

The script content is:

# cat testpgsql.php

<?php
$dbconn = pg_connect("host=172.16.1.158 port=5432 dbname=test user=postgres");
$result = pg_exec ($dbconn, "update table2 set C2=C2+1;");
$result = pg_exec ($dbconn, "update table2 set C2=C2-1;");
pg_close($dbconn);
?>
#

The test result is:

# ab -c 5 -n 50 http://127.0.0.1:7070/testpgsql.php

This is ApacheBench, Version 1.3d <$Revision: 1.67 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done
Server Software: Apache/1.3.27
Server Hostname: 127.0.0.1
Server Port: 7070

Document Path: /testpgsql.php
Document Length: 0 bytes

Concurrency Level: 5
Time taken for tests: 51.508 seconds
Complete requests: 50
Failed requests: 34
(Connect: 0, Length: 34, Exceptions: 0)
Broken pipe errors: 0
Total transferred: 15000 bytes
HTML transferred: 6750 bytes
Requests per second: 0.97 [#/sec] (mean)
Time per request: 5150.80 [ms] (mean)
Time per request: 1030.16 [ms] (mean, across all concurrent requests)
Transfer rate: 0.29 [Kbytes/sec] received

Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 2
Processing: 443 4973 3067.8 4513 12357
Waiting: 441 4973 3067.9 4513 12357
Total: 443 4973 3067.7 4513 12357

Percentage of the requests served within a certain time (ms)
50% 4513
66% 6278
75% 7308
80% 7712
90% 9422
95% 10723
98% 12357
99% 12357
100% 12357 (last request)
#

----- Original Message -----
From: "Shridhar Daithankar" <shridhar_daithankar(at)myrealbox(dot)com>
To: "Durai" <visolve_postgres(at)lycos(dot)co(dot)uk>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Friday, November 21, 2003 3:33 PM
Subject: Re: [GENERAL] Concurrent testing PostgreSQL Vs MySQL

> Durai wrote:
>
> > Hi All,
> >
> > I tested "concurrent testing" in MySQL. It works fine. But I
> > couldn't do in PostgreSQL 7.3.4 on HPUX IPF. I got deadlock problem. I
> > used the PHP script to update table( one script increment the column &
> > another one decrement the column). Is the postgres support the
> > concurrent access to update database?
> >
> > I got the following errors:
> >
> > test=# ERROR: deadlock detected
> > ERROR: deadlock detected
> > ERROR: deadlock detected
>
> Did you commited the transaction anywhere? Can we see the php code?
>
> Shridhar
>
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.538 / Virus Database: 333 - Release Date: 11/11/2003

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marek Lewczuk 2003-11-21 10:18:57 Re: Concurrent testing PostgreSQL Vs MySQL
Previous Message Shridhar Daithankar 2003-11-21 10:03:21 Re: Concurrent testing PostgreSQL Vs MySQL