Slow website response (all other users) when launching a large MySQL query

This may seem like an obvious question, but we have a PHP / MySQL application that runs on a Windows 2008 server. There are only about 10 different sites on the server. Admin settings on the site in question allow the administrator to run reports (via the site), which are huge, and in some cases can take about 10 minutes. These reports are huge mysql queries that display data on the screen. When these reports work, the entire site is slow for all users. So my questions are:

  • Is there an easy way to allocate server resources, so if an administrator (website) runs reports, other users can access the site without performance problems?
  • Although running a report kills a website for all users of this website, it does not affect other sites on the same server. Why is this?
  • As already mentioned, a report can take about 10 minutes - is it bad practice to make such reports available on the Website? Did they usually come about as a result of planned tasks?

Thank you very much in advance.

+5
source share
4 answers

There is a flag there LOW_PRIORITY, but I'm not sure if this will have any positive effect, as this is most likely the table / row lock problem you are experiencing. You can get an idea of ​​what is going on with the query SHOW PROCESSLIST;.

- , , ( , - ).

, ( ). read replicated slave .

0

, , , mysql, , , . , mysql, , .

, , . , Newrelic Windows , 30 , .

+1

MySQL, (SELECT ), ! , , , !

0

100% , ?

-, , .

, , varchar, .

, .

It has many operations and automated services that process it without problems due to proper indexing.

0
source

All Articles