slow pg_connect() - Mailing list pgsql-performance

From
Subject slow pg_connect()
Date
Msg-id 200803240840.8128@centrum.cz
Whole thread Raw
Responses Re: slow pg_connect()  (Craig Ringer <craig@postnewspapers.com.au>)
Re: slow pg_connect()  (Tommy Gildseth <tommy.gildseth@usit.uio.no>)
Re: slow pg_connect()  (Thomas Pundt <mlists@rp-online.de>)
List pgsql-performance
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?

$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 "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:

Previous
From: Tom Lane
Date:
Subject: Re: Views and functions returning sets of records
Next
From: Dennis Bjorklund
Date:
Subject: Turn correlated in subquery into join