Задавайте вопросы, мы ответим
Вы не зашли.
Страниц: 1
Есть высоконагруженный сайт. Сделан на основе DLE. Периодически возникает множество запросов, которые выполняются минутами.процессов под катом.
Что делать?
| 8759 | admin | localhost | quote2t8_2trnew | Query | 159 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:02:52' GROUP BY m_date ORDER BY date desc |
| 8786 | admin | localhost | quote2t8_2trnew | Query | 129 | Sorting result | SELECT id, autor, date, short_story, full_story, xfields, title, category, alt_name, flag FROM dle_post WHERE category regexp '[[:<:]](7)[[:>:]]' AND approve = '1' AND date < '2009-09-09 21:03:14' ORDER BY fixed desc, date DESC LIMIT 0,20 |
| 8787 | admin | localhost | quote2t8_2trnew | Query | 129 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:03:14' GROUP BY m_date ORDER BY date desc |
| 8788 | admin | localhost | quote2t8_2trnew | Query | 129 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:03:14' GROUP BY m_date ORDER BY date desc |
| 8789 | admin | localhost | quote2t8_2trnew | Query | 129 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:03:14' GROUP BY m_date ORDER BY date desc |
| 8899 | admin | localhost | quote2t8_2trnew | Query | 8 | Sorting result | SELECT id, date, short_story, title, category, alt_name FROM dle_post WHERE category in (7) and approve = '1' ORDER BY date DESC LIMIT 1 |
| 8905 | admin | localhost | quote2t8_2trnew | Sleep | 7 | | NULL |
| 8923 | admin | localhost | quote2t8_2trnew | Query | 8 | Sorting result | SELECT id, date, short_story, title, category, alt_name FROM dle_post WHERE category in (7) and approve = '1' ORDER BY date DESC LIMIT 1 |
| 8940 | admin | localhost | quote2t8_2trnew | Query | 8 | Sorting result | SELECT id, date, short_story, title, category, alt_name FROM dle_post WHERE category in (7) and approve = '1' ORDER BY date DESC LIMIT 1 |
| 8950 | admin | localhost | quote2t8_2trnew | Sleep | 7 | | NULL |
| 8953 | admin | localhost | quote2t8_2trnew | Query | 5 | Sorting result | SELECT id, date, short_story, title, category, alt_name FROM dle_post WHERE category in (8) and approve = '1' ORDER BY date DESC LIMIT 1 |
| 8969 | admin | localhost | quote2t8_2trnew | Sleep | 7 | | NULL |
| 8974 | admin | localhost | quote2t8_2trnew | Query | 8 | Sorting result | SELECT id, date, short_story, title, category, alt_name FROM dle_post WHERE category in (7) and approve = '1' ORDER BY date DESC LIMIT 1 |
| 8996 | admin | localhost | quote2t8_2trnew | Query | 8 | Sorting result | SELECT id, date, short_story, title, category, alt_name FROM dle_post WHERE category in (7) and approve = '1' ORDER BY date DESC LIMIT 1 |
| 8997 | admin | localhost | quote2t8_2trnew | Query | 7 | Sorting result | SELECT id, date, short_story, title, category, alt_name FROM dle_post WHERE category in (64) and approve = '1' ORDER BY date DESC LIMIT 1 |
| 8998 | admin | localhost | quote2t8_2trnew | Query | 9 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:05:34' GROUP BY m_date ORDER BY date desc |
| 9003 | admin | localhost | quote2t8_2trnew | Query | 7 | Sorting result | SELECT id, date, short_story, title, category, alt_name FROM dle_post WHERE category in (64) and approve = '1' ORDER BY date DESC LIMIT 1 |
| 9014 | admin | localhost | quote2t8_2trnew | Query | 9 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:05:40' GROUP BY m_date ORDER BY date desc |
| 9017 | admin | localhost | quote2t8_2trnew | Query | 9 | Opening tables | SELECT * FROM mmvb_mts WHERE date < 1252477200 ORDER BY date DESC LIMIT 1 |
| 9026 | admin | localhost | quote2t8_2trnew | Query | 8 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:05:43' GROUP BY m_date ORDER BY date desc |
| 9027 | admin | localhost | quote2t8_2trnew | Sleep | 0 | | NULL |
| 9028 | admin | localhost | quote2t8_2trnew | Query | 5 | Sorting result | SELECT city, (ip2-ip1) as dst FROM geo WHERE ip1<=1834435539 AND ip2>=1834435539 ORDER BY dst ASC LIMIT 1 |
| 9029 | admin | localhost | quote2t8_2trnew | Query | 8 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:05:43' GROUP BY m_date ORDER BY date desc |
| 9030 | admin | localhost | quote2t8_2trnew | Sleep | 8 | | NULL |
| 9031 | admin | localhost | quote2t8_2trnew | Query | 8 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:05:29' GROUP BY m_date ORDER BY date desc |
| 9036 | admin | localhost | quote2t8_2trnew | Query | 7 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:05:44' GROUP BY m_date ORDER BY date desc |
| 9038 | admin | localhost | quote2t8_2trnew | Query | 4 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:05:47' GROUP BY m_date ORDER BY date desc |
| 9039 | admin | localhost | quote2t8_2trnew | Query | 4 | Copying to tmp table | SELECT DATE_FORMAT(date,'%b %Y') AS m_date, COUNT(*) AS cnt FROM dle_post WHERE approve = '1' AND date < '2009-09-09 21:05:47' GROUP BY m_date ORDER BY date desc |
| 9041 | admin | localhost | NULL | Query | 0 | NULL | SHOW FULL PROCESSLIST |
+------+-------+-----------+-----------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
29 rows in set (1.28 sec)
Неактивен
Если нет индекса на dle_post(date), надо его создать. Если есть — то
переписывать запросы так, чтобы меньше нагружали базу. Ну или делать
какое-то экстенсивное решение типа добавления количества машинок
и создания схемы репликации.
Ну и, раз уж я всегда пишу это при упоминании dle: DLE — зло, если Вы
от него избавитесь, то станет только лучше
Неактивен
Страниц: 1