News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

One Table Per Board/Category

Started by pulpitfire, March 05, 2004, 08:52:30 AM

Previous topic - Next topic

pulpitfire

What if every board, or at least every category, had it's own table?   Wouldn't that speed things up?  You wouldn't have to search through 50,000 messages, WHERE ID_BOARD (or whatever) = X, just to get the data for a specific board.  you just query (Select * FROM $board DESC LIMIT $limit).  And maybe you could eliminate the Board Table (or whatever it is now), and just keep all the relevant topic, board, and message data in one table for each board, so you don't have to do joins.

maybe big boards could automatically create additional tables every $posts or so, and integrate that into the board title, so it could just automatically query the right board with a SELECT * FROM $board variable. or does SMF already do some of these things?

Chris Cromer

But the board index would be slower. ;)
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

Christian Land

Splitting data like this would increase the amount of logic you have to put into things like searching (searching through n tables instead of just one), moving/splitting/merging topics (again: n tables instead of one) and so on...

And i think that it wouldn't speed up the board very much... I did some tests with my own forum-system and its response times are very small no matter if i put 100000 or 200000 postings in the database....

So I think it would be pointless to split the data into dozens of tables... it only makes handling much more complicated....

((and btw. there are hosters out there that limit the number of tables a user can create - so you won't be able to run bigger forums on their servers))

Grudge

Indeed - I don't see the point of this. mySQL is designed to handle large tables - it's database software after all. You'd make the SQL very confusing to go through (each board and topic with own table on a 20 board forum is 40 tables). Plus in addition you'd require a ridiculous amounts of changes to code/upgrade/install scripts that would not be worth it IMHO. I know phorum uses this method and frankly I found it appallingly difficult to administrate the sql - it's just too confussing.
I'm only a half geek really...

[Unknown]

If we decided to remove all indexes - primary and otherwise - from all the tables, yes this would help.  As it is, there would be no benefit - as Christian Land explained.

-[Unknown]

Advertisement: