-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Ang,
on 05/12/05 01:27 Ang Tun Chek wrote:
> To all,
> Currently, my code establish a database connection for each function.
> so my question is
>
> 1) will the speed of executing reduce by doing this way?
>
Well yes - it does take a little time to open up and tear down a
connection, but IMHO performance is not that important :)
> 2) is it better to establish a database connetion at the beginning of
> the program and termiate at the end? so only one connection required for
> the program
>
Well - I'd say yes - except ofcourse you have to control rollback and
commits in the individual function/method.
Atleast this is the way I've done it in the classes I've written and
IMHO it is the "right" thing to do - but nothing urgent :)
p.s. I'm glad to see you furthering the project - I hope you have good
use for the functions you write yourself and I would be very happy if
you could share with us, how/what you use these functions for.. I would
like to add a page on the site, listing everyday functions the current
codebase is used for. I intend to add my own usage too ofcourse :)
- --
Regards,
Klavs Klavsen, GSEC - kl...@vs... - http://www.vsen.dk
PGP: 7E063C62/2873 188C 968E 600D D8F8 B8DA 3D3A 0B79 7E06 3C62
"Those who do not understand Unix are condemned to reinvent it, poorly."
--Henry Spencer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCgiV3PToLeX4GPGIRAhX2AKCQjavZlEQVAQjRW685jmb55BPHQQCdFAFV
1iXnW5Q8ZINJBVfieq0Dpko=
=RdmL
-----END PGP SIGNATURE-----
|