« postgres ... turtle or hare? | Main | Mail.app and SSL »
March 24, 2004
postgres furthered...
While not to add more gas to the fire here, Joseph Scott took some time to try and prove or disprove my findings over on his blog. Very cool, minor comments on it though:
- My tests were done using gettimeofday() because each connection was done via the C codebase, not directly in PHP where you also get added overhead of parsing time and connection hashing. As a side, the PHP microtime() function just calls gettimeofday() with a little additional math to micro-ize it ( tv_usec * 1000000.00).
- I wanted to ensure that each connection was being freshly established, not following the PHP hash to see if one connection currently exists or not. To do this any and all connection timings were done in the PHP-4.3.4/ext/pgsql.c:557 or there about. The same was done for the mysql and mysqli systems. This could explain why the significant difference was found in the PHP *_pconnect() tests, which often are essentially the same C code as connect (only one gets added to an internal PHP hash.
I'm not trying to suggest that there are flaws in Joseph's method, rather it's interesting to note despite the differences in approach the results are rather similar (minus the *_pconnect() testing).
Thanks to everyone who have provided constructive criticisms via email and comments.
Posted by Dan at March 24, 2004 05:30 AM