From: "Michael Hall" <[EMAIL PROTECTED]>
> I'd like to run this past anyone who'd care to comment before I get too
> far down the track I'm considering taking with a PHP web portal site.
>
> Is it a wise idea to have a PHP web application running on multiple
> databases? Everything I've done to date has run off one database, no
> matter how large it got. With the current small portal site, the idea is
> to break a monolithic database up into around 10 smaller databases, each
> of which should be able to be backed up to a floppy. Not all databases are
> called on each page, but up to 6 or so could be.
>
> What are the performance implications (slower, obviously, but 10 times
> slower?). Performance beyond what the human mind can perceive is not
> relevant to me.
>
> Should I use mysql_connect or mysql_pconnect for each db connection ?
>
> Should I be careful to use mysql_close with each connection?
>
> Any advice appreciated.
>
> Mick
>
Do you mean 10 different database servers, or 10 databases on the one
server?
As far as I know, separate databases on the one server give the same
performance as separate tables in one database.
With separate database servers you will run into new problems such as:
-) additional connection overhead for each server, if you need to access
more than one server in a page
-) can't combine data from servers, e.g. can't JOIN tables
Persistent connections may or may not help. Using persistent connections
could negate the connection time overhead, but you get a memory overhead
instead - if you have 40 connections open, there's got to be 40 mysqld
processes (threads?) running too.
Cheers
Simon Garner
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]