Performance advice for PHP DB

View: New views
1 Messages — Rating Filter:   Alert me  

Performance advice for PHP DB

by Liran Tal-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey,

I use the PHP DB from the Pear packages as a db abstraction layer so that
I'm able to support multiple databases.
In my PHP application it happens that on a single page I execute SQL queries
in varying parts and so for every part I open the database
and close it, and that could happen for about 5 or 6 times for a single
page.

I was wondering how others do it and if this is an impact on performance.
Is it feasible that for each user login session I open the connection to the
database and keep it open until the session is ended,
upon which I disconnect the db connection? (feasible in terms of security
and performance)

Thanks


Regards,
Liran.
LightInTheBox - Buy quality products at wholesale price