SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jul 2004
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Huge Database - will it be ok? or another solution

    I am programming a site right now and I have run into an issue that i think may be a problem. My original idea was to make a database called "votes" which would store every vote, by every user, for every contest (voting on photography). I thought though, if I get 200 entries, and 200 votes on each (in the future), and have 2 or more contests per week, thats 40,000 rows added each week. The reason I wanted to do it like this is so that I could search for all votes by a user, or search for all votes on a photo, or all votes for a contest by a user, or all votes for a contest for a photo, etc.... you get the idea. Also, I would want to keep all the previous votes so the user could search through the archives.

    My question is, would such a large number of rows (getting up into the millions, even ten millions) be a problem with speed? Especially searching through that many tables?

    Also, it would be great if you could help me come up with another solution for this problem.

    Thanks

  2. #2
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No problem at all. MySQL'll handle it just fine.

    40,000 each week would give take you half a year to reach a million rows. I've got MySQL tables with 7-8M rows doing just fine.

    Of course you'll want to do some optimization to keep speed up (Jeremy Zawodny has a great book on this: READ IT (cowritten by my good friend Mike).
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  3. #3
    SitePoint Member
    Join Date
    Jul 2004
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could you give me some quick tips on that optimization... and maybe the title of that book or where i could find it

  4. #4
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here's the book: http://www.amazon.com/exec/obidos/tg...74538?v=glance

    Performance: indexes, indexes, indexes
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  5. #5
    SitePoint Addict pointbeing's Avatar
    Join Date
    Jun 2004
    Location
    London, UK
    Posts
    227
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also normalization. It's important.


    http://www.oreilly.com/catalog/javad...apter/ch02.pdf


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •