"Estimated database size after purge" causing long lasting SQL query
|Reported by:||larsen||Owned by:|
|Priority:||normal||Milestone:||1.8.3 - Piwik 1.8.3|
When I open the privacy tab in the admin settings, I can see that the MySQL server is blocked for around 1-2 minutes with this query:
SELECT idvisit FROM piwik_log_visit WHERE '2009-12-18 00:00:00' > visit_last_action_time AND idvisit > 0 ORDER BY idvisit DESC LIMIT 1
I guess that this is caused by the "Estimated database size after purge" function. Our DB is around 10 GB big. "Delete logs older than" is set to 900. CPU is a Dual Xeon 3050. RAM 2 gb.
As a result of that query, multiple other queries get blocked until it is finished.
IMHO that value should only be fetched if the user explicitly clicks on a button or something like that.
Change History (11)
comment:1 Changed 23 months ago by matt (mattab)
- Cc cappedfuzz added
- Milestone set to 1.8.2 - Piwik 1.8.2
comment:5 Changed 22 months ago by capedfuzz (diosmosis)
- Resolution set to fixed
- Status changed from new to closed