On 02.05.2005 17:41, Scott Marlowe wrote:
But if the average PHP script takes 50 milliseconds to start up and 100 milliseconds to run, then either one is still pretty much noise.
Yeah, _IF_ :)
Our scripts reside precompiled in a bytecode cache so there just isn't much start up time ;)
I just replaced the simple query with a real world one:
http://hannes.imos.net/real_world.txt
http://hannes.imos.net/pconnect.php http://hannes.imos.net/connect.php
Refresh both a few times to get meaningful result.
Still factor 3-4. And this is one of the most complex queries we have -- and factor 3-4 just makes a differece for us :)
Plus, neither benchmark is interesting really until you have pretty good parallel load running.
The scripts are on a production box with decent load.
It may well be that pconnect makes a difference under heavier load. But most the time, I've seen one or two queries that could be tuned make a much larger difference than using pconnect.
We allways try to optimize and get most of performance from a query anyway :)
And, if you haven't got apache / postgresql configured properly and run out of connections, the connect time goes from 16 mS to hours as your users wait for you to fix the connectivity issues. :)
True, but we will test high load and will make sure that this won't happen :)
-- imos Gesellschaft fuer Internet-Marketing und Online-Services mbH Alfons-Feifel-Str. 9 // D-73037 Goeppingen // Stauferpark Ost Tel: 07161 93339-14 // Fax: 07161 93339-99 // Internet: www.imos.net
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq