[Dbix-class] Multiple connections
Dave Howorth
dhoworth at mrc-lmb.cam.ac.uk
Thu Jan 16 14:23:32 GMT 2014
Lianna Eeftinck wrote:
> Just curious, why would you want to make two connections to the same
> database with only a difference in the mysql_enable_utf8 option? It is
> generally a bad idea to open more than one connection to a database because
> you might find updates in one are not showing up straight away in the
> other, such as when transactions are involved. It also takes more resources
> on both sides.
It's read-only access to this database, so there's no risk, and I don't
think two connections rather than one is likely to lead to a resource
problem.
> UTF8 and string encoding options can probably be handled in other ways from
> one and the same connection.
I'm open to any suggestions, but for now it looks like the
two-connection approach solves my problem.
Cheers, Dave
PS Thanks to everybody else who replied.
More information about the DBIx-Class
mailing list