@andy.smithers wrote:
We have a user who reports out on various PIWIK 'standard' reports out of the Action option.
The problem is that as the underlying PIWIK database has grown the performance of this report generation (and others in a similar vein) has slowed down and now crashes.
What I don't currently have access to, is to see the actual queries behind the buttons, but one concern I have, is that as the reporting is limiting to a specific date range (e.g. Last Month), that if the query has a format for finding the date similar to ..
WHERE DATE( CONVERT_TZ( server_time, '+00:00', '+08:00' ) ) = '2016-05-01'
then MySQL will then not use any supporting index with 'server_time' within it and end up doing a table scan as a result as opposed to an index scan or preferably index seek.
as oppose to rewriting the query so any calculations are done on the supplied date range or not at all?
WHERE server_time >= '2016-05-01 00:00:00'
and server_time < '2016-06-01 00:00:00'So can someone enlighten me as to what the underlying queries look like?
Posts: 1
Participants: 1