views:

89

answers:

6

Hi there,

I would like to be advised on what would be better (in regards to performance)

A) 1 DATABASE with 4 tables

or

B) 2 DATABASES (same server), each with 2 tables.

The tables size and usage are more or less similar, so the 2 tables on Database 1 would be similar usage/size to the 2 tables on database 2

The tables could have +500,000 records and the 2 tables on each database are not related (no join queries etc between them)

Thanks in advance for your comments

+1  A: 

i'd expect no differnce in performance.

steelbytes
+1  A: 

Performance-wise, no significant difference. Consider which is better from a management perspective instead (e.g., do they share access control rules) and whether you've got a hardware configuration that can hold them all together. Sharing management is a good reason to put them together, needing to split across hardware is a good reason to separate.

Donal Fellows
A: 

Apart from no performance difference, I would also think about the data back-up strategy for moving tables to different databases or keeping all in the same database.

ydobonmai
A: 

Performance wise, no difference.

Maintenance wise, it will be much easier to go with the single database option. One maintenance plan to run, one backup to do, one backup file to move around.

baldy
A: 

As others said before me, performance wise it's no difference and one single database is easier to maintain concerning backups etc.

However, if you should really need the performance (even if 500k records isn't that much for SQL Server) you can put the tables in one database and split the database into different database files (called filegroups).

You can put each file on a different drive (which will increase the performance), and you can decide which table you put in which file.

So this is kind of "the best of both worlds": only one database to maintain, AND you can increase the performance.

haarrrgh
thanks for your idea. I forgot to mention, I am using MySQL instead of SQL Server (not my choice).Do you know if I can do "filegroups" or similar on MySQL ?
griseldas
Sorry, no idea. I don't have a lot of experience with MySQL. But again, 500K records is not that much for a database, so maybe you don't need the performance tweak?
haarrrgh
A: 

Ok, thank you all for your input

I will create then just one database, as you all say, it is much easier to maintain, back up, etc

griseldas