Skip to:
Content
Pages
Categories
Search
Top
Bottom

What are these tables?

  • Hi,

    I am seeing many tables like this in my PHPMYAdmin

    wp_user_1_activity

    wp_user_1_activity_cached

    wp_user_1_friends_activity_cached

    for so many of my users..

    Can anyone explain.. what are these tables?

    Regards

    Tabish

Viewing 20 replies - 1 through 20 (of 20 total)
  • Avatar of yu
    yu
    Participant

    @gerbilo

    for every user BP creates 3 new tables. for his and his friends activity on the site. dunno why it is so, but it’s a fact ))

    My Goodness.. so that means if I have 50,000 users.. BP will make 50,000 tables?

    What kind of programming is this man?

    Regards

    And also i noticed that it makes a New folder for each user to upload their images.. means if you have 1,00000 users you will have:

    100000 x 3 = 3000000 Tables

    and 100000 folders for images..

    I am really shocked about this..

    Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    If you dig around the forums you’ll find the rationale behind this, which is that it’s much easier to scale a site with this database structure than storing all user information in a limited number of tables.

    It really isn’t that hard to believe since the plugin is creating 3 tables for every user when WPMU creates 8 tables for every single blog right now. It makes perfect sense from a scaling point of view because there are already solutions to split the information from WPMU across multiple databases and something in the works for scaling BP information as well.

    There are multiple installs of WPMU right now having to use multiple servers to run their installations and a large BP site might have to do the same if it is busy enough. Having the data in just a few tables doesn’t allow scaling and puts limits on something that doesn’t have to have any. 50,000 users information in a couple of tables is not the best solution. I would rather have those 50,000 users spread across 4000 databases so that you are scanning for 12.5 users per database. Even better would be those 50,000 users over 256 databases. With 4000+ databases you can have millions of users ;)

    Avatar of Mike Pratt
    Mike Pratt
    Participant

    @mikepratt

    Well said Trent. I would imagine one should only chime in with criticism like this if you know database optimization….but that’s just me

    Trent & Mikepratt

    I am running a website with more than 3 million users and the profile and other SQL extensive pages result always comes within 0.0002 seconds.

    3 million users and their profile info and other things, including pictures, albums, friends, groups are divided into 10 tables only. Site is online for about 6 years and running on only one dedicated server. You can assume the hits on the site like this. The whole database is optimized by me and all the queries are written by me. I know if this site was made on buddypress on any other open source, we would have needed atleast 500 servers to control the traffic.

    plentyoffish.com is world’s top dating website and having only 6 servers and only One database server, while match.com and others have few thousands servers (with lesser hits than plentyoffish.com). The truth is that plentyoffish is being run by one guy and he knows how to make database and tables.

    I am not here to criticism anyone, I told what I felt.

    I don’t know if i need to make 1 million database in future to control my 3 million users.

    Regards

    Tabish

    Avatar of yu
    yu
    Participant

    @gerbilo

    Trent, i’m not sure, but one query for one table with thousand users is allways better that thousands queries to thousand tables with one user in it, isn’t it?

    One more thing I forgot to mention.. As I said that BP makes one directory for each user to upload their images.. if that is true then..

    3 millions users mean 3 millions directories on my server. Does anyone given a single thought about inode in linux? when you get VPS or server, you get limited inode.

    Trent & Mikepratt

    You can visit following link and see

    http://bobfield.blogspot.com/2006/03/million-tables.html

    Regards

    Tabish

    These are great issues to bring up on the buddypress mailing list and I encourage you to do it. I do not develop WPMU or Buddypress and these are just my opinions. This is just background information as well. WPMU is known to be extremely server intensive as is.

    Right now, most scaling solutions have been implemented for WPMU and the database structure that is already developed and in place. Mainly, blog sites like wordpress.com and edublogs.org. They have implemented multi-database solutions where the request gets analyzed for the blog hash and directed to the proper database and the connection only occurs to the database that houses that data. Databases can reside on any server in any location.

    Images are also housed in directories created through the blog hash as well. This also allows you to have multiple image directories in multiple locations if you wanted. Some even offload some of their images to 3rd party services like S3.

    At present time, AFAIK, there is no solution for spreading around the buddypress data. It hasn’t been addressed yet.

    I am not going to argue and say this is the most ideal circumstance or setup. There are plenty of discussions on scaling both in the WPMU forums as well as in the WPMU Advanced Forums as well as on the WPMUDEV Premium Forums. Not to mention the WP Hackers list is also a great resource from the real developers and hackers of WP in general.

    Buddypress, like WPMU, are open-source communities and all input is not only welcomed, it is encouraged! Feel free to add anything that you feel would be better. I am sure Andy is welcome to hearing all feedback if you know a better way to do something.

    My previous comment on this topic was purely my opinion on how the current setup could be scaled based on my experience with already ongoing projects. Right or wrong, it is just my opinion.

    Avatar of Danf
    danf
    Participant

    @danf-1

    I’ve had this concern as well. I hope to one day get to the point where this becomes an issue :)

    For those that are concerned about the database structure but still want wpmu, there is an effort called lyceum at http://lyceum.ibiblio.org/ that modifies the wpmu codebase to use single tables instead of creating new tables for blogs.

    One of the main drawbacks is that plugins that create their own tables need to be modified a bit to support this structure. This would include BP, for sure.

    I still don’t have a good sense of how many people are actually using it as it doesn’t seem to have a very active community.

    I’d be interested to see if bp could run on top of it and which is more scalable.

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    http://lyceum.ibiblio.org/ >> About >> ‘Error establishing a database connection’.

    Hmmm… Well I wanted to look at it. :)

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    All good points.

    Remember, WordPress.com runs WordPress MU and has over 5 million blogs.

    Avatar of yu
    yu
    Participant

    @gerbilo

    apeatling, did you saw code of this site or know what server it running at?

    @apeatling

    How many servers wordpress.com is running on?

    My experience with wordpress is NOT good at all. I made a website with wordpress, only 3 or 4 plugins installed (all plugins checked and optimized), 600 categories made, and so far 700 posts are there.

    A single post page showing more than 35 SQL queries and on an average it takes from 3 seconds to 6 seconds to generate a Single post page. I optimized database, setup PHP eAccelerator and it is hosted on VPS.

    With this much server resource, if 600 categories and 700 posts are taking making it that slow, then I can not imagine to have millions of posts on wordpress. I can not afford to have 1000 servers for one million post.

    If you google a bit, you will see how many people complain about wordpress for being SLOW. Looks like there is no limit for SQL queries in wordpress and if just to receive a category hierarchy one needs to run 35 queries, then there is some serious issue with the optimization.

    I am not a GURU or Genius, I respect wordpress developers from the bottom of my heart BUT I think there should be some thought about making it fast. Every time with the latest release (of wordpress) we see Lots and lots of AJAX and CSS improvements and it is making it much more slower than ever. The write post pages, you just try it on dial up or some other slow connection and you will know what i mean.

    For the beginning it feels like Haven to get a site with lots of controls and free updates but as soon as you start growing, you realize that there is something seriously Wrong with your system. All the money you earn from advertising will go to the hosting companies.

    This is just my experience and I am not arguing with anyone.

    In addition to my previous page:

    I found an article where Barry is claiming to have 300 Servers for wordpress.com with 10 million page view (in year 2007). In same post one user has madea comment:

    “300 hosts to serve only 10 million pageviews? This is a little bloated, isn’t?

    I know a case that only 2 hosts serves more than 350 millions of pageviews!!”

    Regards

    I don’t want this thread to be dead.. Can someone share some other experiences?

    There are many places that you can discuss this that I mentioned above including the wpmu, hackers, wordpress & other lists if you want to further discuss this.

    WPMU forums as well as in the WPMU Advanced Forums as well as on the WPMUDEV Premium Forums

    Avatar of auwagner
    auwagner
    Participant

    @auwagner

    My 2 cents… Buddypress is built upon WordPress and WordPress MU. If I didn’t like the architecture of WordPress and had concerns with it’s performance to begin with, I probably wouldn’t spend to much time on Buddypress. On the flip side, if I was creating a social compliment to WordPress, I would keep the architecture similar as to take advantage of upgrades, the huge community and extending the system through plugins.

    In creating systems in the past, I haven’t designed this way, but I completely understand why Buddypress has made this choice. And I’ll use it. :)

Viewing 20 replies - 1 through 20 (of 20 total)

You must be logged in to reply to this topic.