On 3/13/03 6:47 AM, "Tom Norwood" <[EMAIL PROTECTED]> wrote:

> I am currently looking at building a Perl object to handle data from a
> a database.
> I'm not really sure if it is best to have one connection to MySQL and
> let the object just deal with its own properties.
> Or to allow the object to initiate a DBI connection each time an instance
> of the object is created, and to disconnect() using garbage disposal.
> 
> Although the object initially would only have one instance per script,
> I can't help feeling it is a bad idea.
> 
> Any thoughts welcome, and greatly appreciated,
> Tom Norwood.

I believe you make that decision by either using or not using mod_perl. If I
remember correctly it was also pointed out on this list that the connection
overhead in mysql is rather small thus if you did not use mod_perl so far,
the permanent connection to mysql should not be your only argument to switch
:-)

Cheers/h


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to