note 81339 added to ref.pgsql

From: Date: Sat, 23 Feb 2008 03:53:55 +0000
Subject: note 81339 added to ref.pgsql
Groups: php.notes 
Request: Send a blank email to php-notes+get-136432@lists.php.net to get a copy of this message
There's something seriously flawed with PHP's implementation of the PostgreSQL extenstion. By simply executing this statement: $con = pg_connect("dbname=db1 user=db1user host=127.0.0.1 password=password"); The number of requests per second my script can handle drops from 2100 requests/second to 100 requests/second (as seen by ab -c 10 -t 30 http://localhost/script.php). This has been reproduced on three of my systems, and PHP doesn't have any problem like this with MySQL. This is a PHP problem, not a PostgreSQL problem. Python and Ruby don't have this problem with PostgreSQL. It's insane, because I ported the same script to Python and it's much faster with PostgreSQL than with MySQL (~1400 requests/second for PostgreSQL, ~1000 requests/second for MySQL). I'm going to try the latest CVS version of PHP 5, and see if it fixes it. Any ideas why this is so slow on PHP? ---- Server IP: 208.69.120.35 Probable Submitter: 216.9.13.21 ---- Manual Page -- http://www.php.net/manual/en/ref.pgsql.php Edit -- https://master.php.net/note/edit/81339 Del: integrated -- https://master.php.net/note/delete/81339/integrated Del: useless -- https://master.php.net/note/delete/81339/useless Del: bad code -- https://master.php.net/note/delete/81339/bad+code Del: spam -- https://master.php.net/note/delete/81339/spam Del: non-english -- https://master.php.net/note/delete/81339/non-english Del: in docs -- https://master.php.net/note/delete/81339/in+docs Del: other reasons-- https://master.php.net/note/delete/81339 Reject -- https://master.php.net/note/reject/81339 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136432) next »