Hi,
I'm using the latest version of this module. And as per my request to include the number of user based on today, weekly and monthly, actually this modules increase in queries and time executing.
Here from Devel report:
all queries taking ~166.69 ms to execute:
166.69 ms = SELECT count(*) AS total FROM counter WHERE SUBSTRING(counter_date,1,10) > '2010-12-02' AND SUBSTRING(counter_date,1,10) <= '2010-12-09'
162.89 ms = SELECT count(*) AS total FROM counter WHERE SUBSTRING(counter_date,1,10)= '2010-12-09'
158.16 ms = SELECT count(*) AS total FROM counter WHERE SUBSTRING(counter_date,1,7)= '2010-12'
142.16 ms = SELECT count(*) AS total FROM counter WHERE SUBSTRING(counter_date,1,4)= '2010'
IMHO, i think these data should be read from counter_data instead running for every query.
Maybe it can built one function to re-calculated summary data for this every X hour.
This X hour can be set in counter admin, or let user choose to run every cron time. I think by doing this, it can speed up most site that have about 1000+ visit per day.
Thanks
Comments
Comment #1
drupalnesia commentedYou can set it in Counter Settings - Advanced:
- Delay before refresh counter data (in second):