multiforums addon: 1 database or many databases?

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
krijtgat
Registered User
Posts: 22
Joined: Sun Mar 21, 2004 12:07 pm

multiforums addon: 1 database or many databases?

Post by krijtgat » Sun Jan 01, 2006 9:49 pm

Hello,

I'm developping a multi forum version of phpbb, something like sebflipper's but I'm going to make it (most probably) for free.

Now I have a question:
To store all forums, I can use 1 mysql database and change the table prefix per forum OR I can let a script create a database per forum.

What would have the best preformance? Keep in mind that today almost every host has unlimited databases.

Cheers

SmartSquid399
Registered User
Posts: 98
Joined: Fri Jul 08, 2005 6:13 pm
Contact:

Post by SmartSquid399 » Sun Jan 01, 2006 11:44 pm

It depends. If you are going to have unlimited forums, I'd recommend using one database. Of course, having multiple would be more organized, but it would take a LOT of space on the server. Also, I'm not sure about performance, but I think it would run faster on one database. Again, I'm not sure about that last one.
Notepad2 || FireFox

I'm here to help with: PHP, phpBB (obviously), Server Set-up, HTML, CSS, and JavaScript.

Kiwietje
Registered User
Posts: 18
Joined: Sat Dec 31, 2005 7:47 pm

Post by Kiwietje » Sun Jan 01, 2006 11:54 pm

When a database get's to big it slows down. So I should go for a database for every forum :)!

But i don't know much about this :D!

Azuin
Registered User
Posts: 35
Joined: Thu Sep 29, 2005 9:59 pm
Contact:

Post by Azuin » Mon Jan 02, 2006 3:32 am

I would have one central database which manages the different forums/forum ids/and their database names, then separate databases for each forum.

I'm no expert on speed, but I am pretty sure that having multiple databases won't take up much extra space (the structure is the only difference in space, and the structure is nothing compared to the actual data rows).

mavrik42
Registered User
Posts: 44
Joined: Sun Aug 08, 2004 2:04 am

Post by mavrik42 » Fri Jan 06, 2006 4:45 pm

I would be very interested in this multi-forum version of phpbb :)
As for single database to multiple databases, a different database for each forum would be the way to go. When a single database gets too big then it creates a bottle neck and can tend to choke a server. multiple databases will result in better performance, especially if you have a number of large active forums.
Different users for each database would also be better for database performance.
Earn revenue from your site. From google adsense to adding the capability for users to have images smsed to there mobile phones covered. revenuedriven.com
The forums features a revenue sharing system utilizing google adsense, create a topic today to recieve adsense clicks :) Click Here to view the forum.

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun » Fri Jan 06, 2006 5:36 pm

mavrik42 wrote: As for single database to multiple databases, a different database for each forum would be the way to go.

I disagree. phpBB has 29 tables in a "standard" installation. Suppose you have 10 boards, that's 290 tables. MySQL has limits on how many tables you can have open at a time, and it's not limited to actual application tables but includes temporary tables as well. You could conceivably run 50, 100, or more boards on a single server, each with their own database, but that's actually less efficient, at least as far as I understand.
When a single database gets too big then it creates a bottle neck and can tend to choke a server. multiple databases will result in better performance, especially if you have a number of large active forums.

100 small databases is going to be less efficient than 1 large database, for reasons mentioned above.
Different users for each database would also be better for database performance.

If you do it right, with proper indexing and tweaking of the phpBB code, I submit that one large database is the way to go. Besides, there is no true "unlimited" databases, you're going to run into resource limits with lots of little databases much sooner than with one larger database.

Tuning efforts are different, to be sure. :-) Tuning a server for 100 small databases is different than tuning a server for one large database. But I submit that for the long haul it's better to have a single set of tables.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

Post Reply

Return to “[2.0.x] MOD Writers Discussion”