Skip site navigation (1) Skip section navigation (2)

slow pg_connect()

From: <firerox(at)centrum(dot)cz>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: slow pg_connect()
Date: 2008-03-24 07:40:15
Message-ID: (view raw or whole thread)
Lists: pgsql-performance

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?


$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 "Generated in ".round($stoptimer-$starttimer,4)." s";

It takes more then 0.05s :(

Only this function reduce server speed max to 20request per second.

Than you for any Help!

Best regards.


pgsql-performance by date

Next:From: Craig RingerDate: 2008-03-24 07:58:16
Subject: Re: slow pg_connect()
Previous:From: Dennis BjorklundDate: 2008-03-24 07:21:32
Subject: Turn correlated in subquery into join

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group