List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:May 17 1999 7:20am
Subject:Re: connect to remote database
View as plain text  
gil wrote:
> Hi,
> Is there any performance loss from accessing a local database using the
> remote syntax like this:
> my $local_database = '';
> Normally, I would say:
> my $local_database = 'DBI:mysql:truepath_db';
> Gil
> your Christ-centered web host

It depends on your configuration of mysqld.  The alternative syntax
using the host name will force the conection to be TCP/IP while the one
without the host name may use the Unix socket if mysqld is configured to
use one. Unix socket connection is about 7%   faster than TCP/IP if I
remember correctly. So you should use 'DBI:mysql:truepath_db'.

Sasha Pachev
connect to remote databasegil17 May
  • Re: connect to remote databaseSasha Pachev17 May