Priorisiting queries or a DSN? Reports killing server!

Discussion in 'Programming' started by amaze, Mar 3, 2009.

  1. #1
    Hi,

    We have a live website that runs fine. We now have wrote some scripts to report on the data. Due to the large amount of data running them brings the server to a standstill.

    We have now created 2 separate DSN's, one for "live" and one for "reports". We are running mySQL v4. Is there a way of prioritising one DSN over another? Or even prioritising the queries themselves? Or another method to ensure our live server doesn't get bogged down by a report query?

    Thanks :)
     
    amaze, Mar 3, 2009 IP
  2. robhustle

    robhustle Peon

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    We would replicate the live DB to another box and then run reports on that box.
     
    robhustle, Mar 3, 2009 IP
  3. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Hi - yeah was thinking that, but of course requires another box, replication, etc etc

    Was hoping there was another method...

    Cheers :)
     
    amaze, Mar 3, 2009 IP
  4. robhustle

    robhustle Peon

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well, have you tried scheduling the report to run at off peak hours? Or do you get load on the server 24/7? If you have a period where your site gets low traffic, maybe you can schedule the task to run then.
     
    robhustle, Mar 3, 2009 IP
  5. Paul_K

    Paul_K Greenhorn

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #5
    Perhaps think about upgrading to mySQL 5. Look at the scheme of the DB, are indexes defines? Can you tune the sql? 9 times out of 10 performance can be gained by setting up the db properly and having someone look at the SQL.
     
    Paul_K, Mar 5, 2009 IP