views:

53

answers:

1

I have a web site using a database named lets say "site1". I am planning to put another site on the same server which will also use some of the tables from "site1".

So should I use three different databases like "site1" (for first site specific data), "site2" (for second site specific data), and "general" (for common tables). In which there will be join statements between databases general and site1 and site2. Or should I put all tables in one database?

Which is the best practice to do? How performances differ in each situation? I am using MySQL. So how is the situation especially for MySQL?

Thanks in advance...

A: 

I believe it can be done but i'm not sure about the performance implications. Take a look at these links:

I'll look around some more to see if I can find more info on performance.

This link seems to suggest there isn't a significant performance hit.

Abe Miessler
Yes I can join tables from two different databases. I have tried it. It works perfectly. But I don't know how the performance will be if there are too many records.
Mucahit Sancar Kahveci
How many is too many? What are you thinking your worst case scenario is?
Abe Miessler
when there are 10milyon records. I may not reach there but I want to know what is the best practice to follow
Mucahit Sancar Kahveci