News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Slow MYSQL queries

Started by romagromov, 12.06.2016 16:07:20

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

romagromov

Hi!
I found that my site with JDownloads works slowly than other sites.
I have checked mysql logs for slow queries and found many strings like this:

# User@Host: myuser[myuser] @ localhost []
# Query_time: 2.083122  Lock_time: 0.000034 Rows_sent: 1  Rows_examined: 1077287
SET timestamp=1465739947;
SELECT log_file_id, COUNT(log_file_id) as count
FROM mybase_jdownloads_logs
WHERE type = '1' AND log_user = '0' AND log_file_id IN (530)
GROUP BY log_file_id;
# User@Host: myuser[myuser] @ localhost []
# Query_time: 2.332044  Lock_time: 0.000104 Rows_sent: 1  Rows_examined: 1077289
SET timestamp=1465739947;
SELECT COUNT(log_file_id) AS sumfiles, ROUND(SUM(log_file_size)) AS sumsize
FROM mybase_jdownloads_logs
WHERE type = '1' AND log_user = '0' AND (log_datetime >= CURRENT_DATE AND log_datetime < CURRENT_DATE + INTERVAL 1 DAY)
GROUP BY log_user;
# User@Host: myuser[myuser] @ localhost []
# Query_time: 2.518723  Lock_time: 0.027745 Rows_sent: 1  Rows_examined: 1077289
SET timestamp=1465739947;
SELECT COUNT(log_file_id) AS sumfiles, ROUND(SUM(log_file_size)) AS sumsize
FROM mybase_jdownloads_logs
WHERE type = '1' AND log_user = '0' AND (log_datetime >= CURRENT_DATE - INTERVAL 6 DAY) AND (log_datetime <= CURRENT_DATE + INTERVAL 1 DAY)
GROUP BY log_user;
# User@Host: myuser[myuser] @ localhost []
# Query_time: 2.085940  Lock_time: 0.000063 Rows_sent: 1  Rows_examined: 1077287
SET timestamp=1465739947;
SELECT COUNT(*)
FROM mybase_jdownloads_logs
WHERE type = '1' AND log_ip = '168.0.83.219' AND log_file_id = '530' AND log_datetime <= NOW() AND log_datetime >= (NOW() - INTERVAL 60 MINUTE);
# Time: 160612 16:59:08
# User@Host: myuser[myuser] @ localhost []
# Query_time: 2.043879  Lock_time: 0.000085 Rows_sent: 1  Rows_examined: 1077289
SET timestamp=1465739948;
SELECT COUNT(log_file_id) AS sumfiles, ROUND(SUM(log_file_size)) AS sumsize
FROM mybase_jdownloads_logs
WHERE type = '1' AND log_user = '0' AND (log_datetime >= CURRENT_DATE - INTERVAL 30 DAY) AND (log_datetime <= CURRENT_DATE + INTERVAL 1 DAY)
GROUP BY log_user;
Best free windows software for your PC at bestwinsoft.com
  •  

Arno

Can it be that you have not limited the amount of jdownloads logs. See jDownloads system plugin.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

rubyonrails

You can use Myql Query profiling to increse your speed.
  •  

romagromov

Quote from: rubyonrails on 19.07.2016 07:27:19
You can use Myql Query profiling to increse your speed.

What is Myql Query profiling ?
How to use it?
Thanks.
Best free windows software for your PC at bestwinsoft.com
  •