Re: [PERFORM] slow pg_connect()

2008-03-24 Thread Chris
* Read about configuring and using persistent database connections (http://www.php.net/manual/en/function.pg-pconnect.php) with PHP Though make sure you understand the ramifications of using persistent connections. You can quickly exhaust your connections by using this and also cause other

Re: [PERFORM] slow pg_connect()

2008-03-24 Thread Thomas Pundt
Hi, [EMAIL PROTECTED] schrieb: Please, how long takes your connectiong to postgres? $starttimer=time()+microtime(); $dbconn = pg_connect("host=localhost port=5432 dbname=xxx user=xxx password=xxx") or die("Couldn't Connect".pg_last_error()); $stoptimer = time()+microtime(); echo "Gene

Re: [PERFORM] slow pg_connect()

2008-03-24 Thread Tommy Gildseth
[EMAIL PROTECTED] wrote: Hi, I'm uning postgres 8.1 at P4 2.8GHz with 2GB RAM. (web server + database on the same server) Please, how long takes your connectiong to postgres? It takes more then 0.05s :( Only this function reduce server speed max to 20request per second. I tried running the

Re: [PERFORM] slow pg_connect()

2008-03-24 Thread vincent
> > It takes more then 0.05s :( > > Only this function reduce server speed max to 20request per second. First, benchmarking using only PHP is not very accurate, you're probably also measuring some work that PHP needs to do just to get started in the first place. Second, this 20r/s is not requests

Re: [PERFORM] slow pg_connect()

2008-03-24 Thread Craig Ringer
Craig Ringer wrote: [EMAIL PROTECTED] wrote: It takes more then 0.05s :( Only this function reduce server speed max to 20request per second. If you need that sort of frequent database access, you might want to look into: - Doing more work in each connection and reducing the number of con

Re: [PERFORM] slow pg_connect()

2008-03-24 Thread Craig Ringer
[EMAIL PROTECTED] wrote: It takes more then 0.05s :( Only this function reduce server speed max to 20request per second. If you need that sort of frequent database access, you might want to look into: - Doing more work in each connection and reducing the number of connections required; -