For a low-ish traffic website that is doing the simple "build pages from
HTML templates and info in a database" kind of thing, do the wise folks in
this newsgroup advocate connecting and disconnecting from the DB with each
query, or maintaining a persistent connection in the session?
I guess my application could work either way, and I've gravitated towards
the connect-query-disconnect method, but not for any really good reason. It
struck me as simpler to stick with the stateless way of doing it. The only
obvious drawback I can see is the performance penalty, which I guess could
be large if the website gets busy.
What do other people think? Is there an obvious best practise on the merits,
or is it down to the application and developer?
--
The email address used to post is a spam pit. Contact me at
http://www.derekfountain.org : <a
href="http://www.derekfounta in.org/">Derek Fountain</a>
HTML templates and info in a database" kind of thing, do the wise folks in
this newsgroup advocate connecting and disconnecting from the DB with each
query, or maintaining a persistent connection in the session?
I guess my application could work either way, and I've gravitated towards
the connect-query-disconnect method, but not for any really good reason. It
struck me as simpler to stick with the stateless way of doing it. The only
obvious drawback I can see is the performance penalty, which I guess could
be large if the website gets busy.
What do other people think? Is there an obvious best practise on the merits,
or is it down to the application and developer?
--
The email address used to post is a spam pit. Contact me at
http://www.derekfountain.org : <a
href="http://www.derekfounta in.org/">Derek Fountain</a>
Comment