ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pear-general
pear-general
Re: AW: [PEAR] DB class speed
by Uros Gruber other posts by this author
Oct 10 2002 8:52PM messages near this date
AW: [PEAR] DB class speed | [PEAR] PEAR Cache wiping out directories.
Hi!

i've check both connection time and only query time. But with
non-persistant is pgsql very slow, query time take 1/5th of
connection time, but it's still much much slower.

In my aplication connection takes 0.0418 and query take
0.0150 seconds. But when i enable persistant everthing start
to fly.

If i execute query in pgsql console it takes only 0.34
mseconds, thats almost zero. So i understand time 3.4
mseconds wiht persistant from php, but i do not understand
time 15 mseconds for same query when using non-persistant.

So i think i have to use persistant but what happens next.
Memory can be filed very quickly, don't you think.

-- 
tia,
 Uros                            mailto:uros.gruber@[...].com


Thursday, October 10, 2002, 10:44:01 PM, you wrote:

TL>  Uros Gruber [mailto:uros.gruber@[...].com] wrote:
> > 
> > Hi!
> > 
> >  I'm making some testing over DB.php
> > 
> >  And i wan't to know if this is normal.
> > 
> >  I've made some script where I connect do SQL server
> >  and execute one simple (1row) query.
> > 
> >  I use pgsql and mysql. tables and indexes are same for both
> >  servers. So test table is identical
> > 
> >  Whe i execute those script i get some timing results
> > 
> > PGSQL
> > Total time: 0.0576
> > Execution time: 0.0185
> > 
> > MySQL
> > Total time: 0.0086
> > Execution time: 0.0028 
> > 
> > I want to know why is sucsh diference. Both servers runing
> > with socket connections and using connnect (non-persistant)

TL>  I think the non-persistent DB connection is the cause of the difference.
TL>  Maybe pgsql connects take (that) much longer than mysql's ?
TL>  I think you should try to
TL>  a) benchmark only the queries and row retrieval (and/or get an extra bench
TL>  for connection creation)
TL>  b) do an application-level benchmark, that is with some real data and
TL>  production logic

TL>  Btw, are there some benches for DB vs PHP's builtin clients (MySQL,
TL>  Postgres, Informix), perhaps with PHP-Acellerator?

TL>  Thomas


-- 
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Thomas Lamy
Uros Gruber

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved