Hello Agustín, Monday, April 22, 2002, 11:50:44 PM, you wrote:
AF> I have a question on a project i am currently on. I am adapting Phorum AF> (www.phorum.org) to my own portal and have a doubt about MySQL. Phorum AF> creates a table for each discussion forum. However, in the portal i work AF> for, i currently have thousands of items that would potentially need a AF> table (with a very little amount of records, rarely more than 10). I am AF> talking of a maximun of 10000 tables. AF> Is there any reason to avoid having a large number of tables (which have AF> the same structure)? AF> Would doing just-one-big-table (with a forum-id) be advisable? Yes - in my mind. It is not the amount of data itself which slows down your queries that much, it depends rather on how your data is structured. If you have a way to tell how to narrow your query to 1 forum of 137, in an ideal world that means you are performing 137 times more effectively. I am writing a forum myself right now. The search is not ready yet, but everything else works fine with 1,500,000 records. If you have an index on forum-id (and why you shouldn't?), there is no much difference in perfomance. I was considering the same thing (splitting into forum-dedicated tables), but that made things messy. For instance, what if you move a thread from one forum to another, and someone has already bookmarked it? No problem if you have only a message ID in the bookmarked URL, but if it contains a reference to an old forum ID, there IS a problem. It is NOT impossible to fix, but involves more complicated writing and consecuently furtilizes soil for all kinds of bugs. By the way, testing your forum against big amounts of data, you might want sometimes to try STRAIGHT_JOIN if you feel MySQL optimizer misunderstands your intentions. In my case it helped dramatically in some queries. Regards, Tom AF> Are there any considerations that I should have? AF> Thanks! AF> --------------------------------------------------------------------- AF> Before posting, please check: AF> http://www.mysql.com/manual.php (the manual) AF> http://lists.mysql.com/ (the list archive) AF> To request this thread, e-mail <[EMAIL PROTECTED]> AF> To unsubscribe, e-mail <[EMAIL PROTECTED]> AF> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Best regards, Toomas mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php