Re: [PHP] Very slow pg access

2002-06-22 Thread Frank


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 querydelete
0.0034  2 queryselect
0.0049  3 queryTHIS 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




Re[2]: [PHP] Very slow pg access

2002-06-22 Thread Uros Gruber

Hi!

Sunday, June 23, 2002, 1:21:07 AM, you wrote:


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

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

F Postgres is very fast - but a connect and 3 queries in 0.002 ms? Hmmm!
i didn't say 0.002 ms i say 0.002 s this is 2ms, but from php
that time was 90ms

I also use one patch for realtimer in pg, it say max 10ms.
without connect, but i don't thik that for connection is user
like 80ms,

I thik that here must be something wrong, or with some lib,
I realy don't know, so i'm asking on that list for help to
solve this.

Btw computer is PII300MHz with 128MB RAM, but in this table
is for now from 0 to 15 entries.


-- 
lp,
 Urosmailto:[EMAIL PROTECTED]


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




[PHP] Very slow pg access

2002-06-21 Thread Uros Gruber

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 querydelete
0.0034  2 queryselect
0.0049  3 queryTHIS 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