The MU forums have moved to WordPress.org

Too many tables in database (12 posts)

  1. qza
    Member
    Posted 17 years ago #

    There are about 300 blogs registered in my wpmu site, but phpmyadmin says there are about 2500 tables in the db.

    I thought every blog has only one table, so is it normal to have so many tables or is it because of some plugin?

  2. Ovidiu
    Member
    Posted 17 years ago #

    there are a lot of plugins that add tables for each blog - if you had a look at the tables with phpmyadmin, if that is the tool you are using you could have seen the table names - they usually start with wp_blogID aka wp_1_{tablename} and as the tablenames are usually quite descriptive you could have figured out that there are usually plenty of tables per blog.

  3. quenting
    Member
    Posted 17 years ago #

    every blog does not have only one table. Every blog has plenty of tables. phpmyadmin is unusable with MU as soon as you reach a couple hundred blogs.

  4. qza
    Member
    Posted 17 years ago #

    Thank you. I'm on shared hosting and doesn't have root access. Is there any other way than phpmyadmin to work with database?

  5. quenting
    Member
    Posted 17 years ago #

    do you have ssh access ? you don't need to be root to manage your db, just have a command line access. Then, just type :
    > mysql -uyouruser -p
    however without root access you'll probably run in many problems with MU...

  6. hery
    Member
    Posted 17 years ago #

    And why do you really need to touch the tables?

    If really you need to, then you can create your queries inside a php file and run them.

  7. andrea_r
    Moderator
    Posted 17 years ago #

    qza - go into phpmyadmin, grab a coffee or something while it loads. Scroll down, click on "optimize".

    If you expect your MU install to get biger, you'll have to move off shared hosting. Which is what I'm doing now.

    Each blog adds 8 or 9 tables to the db. Some plugins add another whole table, some just another field to the options table. It depends.

    hery - there's lots of reasons you may need to go in and tinker with the db.

  8. drmike
    Member
    Posted 17 years ago #

    As to the optimize, I have that script over on wpmudev.org that should work for you as well. It's easier than waiting for phpmyadmin to load.

  9. andrea_r
    Moderator
    Posted 17 years ago #

    that too. :) I was just trying to think up one example.

  10. drmike
    Member
    Posted 17 years ago #

    I do suggest renaming the file if you use it. I do note that some folks have been trying to find it on my own site just to see it run. :)

  11. andrea_r
    Moderator
    Posted 17 years ago #

    hahahaha but oh noes for you. :D Heh.

  12. qza
    Member
    Posted 17 years ago #

    Thank you all for suggestions. I applied for SSH access with my hosting and setup cron jobs for drmike's optimize plugin :)

About this Topic