I find it impossible that PHP should be "slow". PHP's Pg functions are - 
and shouldn't be - nothing more or else than a frontend to the Pg API.

The problem is most likely that you are not comparing the same values. I 
think the analyze values are calculated "internal" values that has little 
to do with real life through an API.

Postgres is very fast - but a connect and 3 queries in 0.002 ms? Hmmm!

The 0.1 s looks more like a "real" value to me.

Best

Frank


At 00:51 22/6/2002 +0200, you wrote:
>Hi!
>
>i made some benchmarks because my script is somehow very
>slow. In this script i execute 3 queries to PostgreSQL server
>and one connect string. I connect to socket.
>
>I check this queries in pg with explain analyze and i have
>result 1.18ms so i add a little and let say that for those 3
>queries need 2ms. (1 simple select, 1 delete, 1 insert)
>
>
>When i check from PHP i use microtime() to check times.
>
>Here is results
>
>0.0443  for connect
>0.0343  1 query    delete
>0.0034  2 query    select
>0.0049  3 query    THIS ONE is INSERT OR UPDATE
>
>0.087 TOTAL
>
>so complete time is about 0.090 s this is 90ms against 2ms. I
>thik that this is not normal. or is PHP so slow or there is
>something wrong with libraries
>
>I use PHP 4.1.2 and pg 7.2.1
>
>Any thoughts.
>
>--
>tia,
>  Uros                          mailto:[EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to