The MU forums have moved to WordPress.org

MySQL table number limitation (6 posts)

  1. jbyungrokim
    Member
    Posted 14 years ago #

    I am currently testing WordPress MU I set up. and now it looks to me that when a new blog is created, close to 10 new tables are being created in MySQL..

    I am concerned about this ever increasing number of tables being created for each new blog.

    I consulted MySQL manual, and they say I can have maximum of 1,792 number of tables with MySQL, which means I can have about 170 blogs.

    What shall I do if the number of new blogs goes on and on, and I hit this 1,792 maximum number of tables limitation??

    I am quite sure I will easily reach over 170 blogs.

    thank you.

  2. andrea_r
    Moderator
    Posted 14 years ago #

    "I consulted MySQL manual, and they say I can have maximum of 1,792 number of tables with MySQL, which means I can have about 170 blogs."

    I've had more than that many blogs in one database. Either you read incorrect information, or you misunderstood what it said.

    If you are concerned, the databases can be split, so you have 16, 256 etc.. look up multi-db plugin or hyper db plugin.

  3. jbyungrokim
    Member
    Posted 14 years ago #

    http://dev.mysql.com/doc/refman/4.1/en/mysql-cluster-limitations-database-objects.html

    above is the link, that I read about 1,792 table limitation with MySQL database.

    I heard that wordPress.com itself is based on wordPress MU.. and they are managing hundreds of thousands of blogs. So there should be a way to handle that many tables in MySQL..

    on the other hand, above link says the maximum number of tables possible with MySQL is 1,792.. What shall I do to manage my WordPress MU like WordPress.com with hundreds of thousands of blogs??

  4. SteveAtty
    Member
    Posted 14 years ago #

    That's a table limit per node in NDB cluster mode, not a single MySQL DB.

  5. andrea_r
    Moderator
    Posted 14 years ago #

    "What shall I do to manage my WordPress MU like WordPress.com with hundreds of thousands of blogs?? "

    Like I said above, there's two plugins available to have multiple databses.

    And to reiterate what Steve said, that limit is per node in NDB cluster mode. That's nowhere near the same as max number of tables.

  6. tdjcbe
    Member
    Posted 14 years ago #

    It also depends on your OS that you;re running. I know we had a CPanel box way back when that had a limit of 12k files per a directory. While only 10 database tables are created per blog, three files are created for each of those tables or a total of 30 files per blog. Please note that I only saw that once, a normal limit is about about 30k files, and that host didn;t last long anyway.

    Using the 12k file limit as an example, that would be a total of 400 blogs. Again, though, that was an artificial limit placed by a host.

    We've discussed work arounds previously. The three main solutions are:

    - Keeping up on spam and unused blogs. That'll only get you so far.

    - Automattic's solution, Hyperdb, which is normally for rollover dbs but is also supposed to work with wpmu: http://wordpress.org/extend/plugins/hyperdb/ Trent uses this one I believe and I'm sure he'll chip in if he's around.

    - Andrew and James' Multidb code with their premium site: http://premium.wpmudev.org/project/multi-db

    Solutions 2 and 3 break down the database tables into collections of databases. Since the file restriction count is only on files within a directory, and each database creates their own directory within the mysql storage directory, this gets around most limits.

    Hope this helps

About this Topic

  • Started 14 years ago by jbyungrokim
  • Latest reply from tdjcbe