Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    8

    Unanswered: Expanding MySQL.

    Hello,
    I am a newbie to web programming. I am building a community site with multiple read/write queries at every page. Everything working well for now. But as the site grows I am afraid my single MySQL server will not be able to handle all the traffic and will get the dreaded "too many connections" error. I have looked into replication and splitting the read queries to the slave and the write to the master seems effecient. But are there any other ways of doing this? Is this how major website sout there do it?

    Thank You

  2. #2
    Join Date
    Jan 2004
    Location
    Toronto
    Posts
    33

    Re: Expanding MySQL.

    Hi,

    You may want to post how many users you expect, page views, SQL queries. Per month or per day, although the critical number is what is the stress level for rush hour traffic (lunch hour?). What type of growth are you expecting that is causing fear? Is the application giving you trouble already?

    Before you get a second server, make sure you make this one as efficient as possible.
    - Views indexed correctly?
    - Joins used where possible to minimize SQL queries?
    - Information is cached in memory if static?
    Tons of other performance tweaks you can do. If all these are done, upgrading memory could help. Once the application is a peak performer and still needs more juice it's be time to look at either additional or better servers.

    But its cheaper and simpler to tweak than to get another server!
    For example, just found out about this LOW_PRIORITY option (http://www.dbforums.com/t980764.html)

    Database design and code design can make a HUGE (and I mean huge) impact on performence.

    -Ziv.

  3. #3
    Join Date
    Jan 2004
    Posts
    8
    we are actually in a process of building a affiliate pogram and the requirements of the program are that it display the raw clicks and uniques and sales for a affiliate for this week and previous week. According to the first program design every signle field was being calculated from a table which logs all hits according to date-time. That ersulted in a worst case senerio of 14 queries for raw and uniques and another 14 for sales calculation. So testing it in a 70,000 record set the processing time was more than a second (which was totally unacceptable). We put in a slave just for the affiliate stats and queried that but that didn't help either( so here is where the question came in).

    But since the previous days uniques, raw and sales are not goign to change we started dumping them in another table which improved things significantly. So for the moment we are not worried.

    Thanx for your reply.

Posting Permissions

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