Re: Persistent Connections in Webserver Environment
От | Hannes Dorbath |
---|---|
Тема | Re: Persistent Connections in Webserver Environment |
Дата | |
Msg-id | 42764126$0$24351$8fe63b2a@news.disputo.net обсуждение исходный текст |
Ответ на | Re: Persistent Connections in Webserver Environment (Marco Colombo <pgsql@esiway.net>) |
Ответы |
Re: Persistent Connections in Webserver Environment
Re: Persistent Connections in Webserver Environment Re: Persistent Connections in Webserver Environment |
Список | pgsql-general |
On 02.05.2005 16:41, Marco Colombo wrote: > Have you measured the real gain in using persistent connections at all? As simple as possible: <?php require_once('Benchmark/Timer.php'); $timer =& new Benchmark_Timer(); $timer->start(); pg_pconnect('host=myhost dbname=database user=user'); pg_query("SET search_path TO myschema;"); $q = "SELECT u.login FROM users WHERE u.user_id = 1;"; $qr = pg_query($q); print_r(pg_fetch_all($qr)); $timer->setMarker('Database'); $timer->stop(); $timer->display(); ?> Results: pconnect: 0.001435995101928 connect: 0.016793966293335 It's factor 10 on such simple things on the BSD box.
В списке pgsql-general по дате отправления: