Counter icon indicating copy to clipboard operation
Counter copied to clipboard

counter_page_visitor huge amount of data ?

Open ahmadyousefdev opened this issue 8 years ago • 1 comments

Hi , first I'd like to thank you so much for this amazing counter package..

I know that the counter_page_visitor table has a specific purpose and all the counter package basically rely on it, but it will get a huge amount of data if there are thousands of pages with thousands of visitors ( correct me if i'm wrong ) .

I don't know if it is possible but I suggest another column in the counter_page table called views_count or something like that, which increment the number of views of this page and put it in that column. with this column we can bulk remove the data in counter_page_visitor table each hour or each day to prevent the huge amount of data ( putting data temporary in counter_page_visitor table )..

It's just a suggestion , if there is another way or if I miss understood the concept of this package please correct me.

Thank you

ahmadyousefdev avatar Oct 04 '16 15:10 ahmadyousefdev

i was after the same thing, also quiring the db through the day "especially when getting lots of unique visitors" is bad.

imo using something like redis/memcached to increment the count and save it like every 12hrs to the db would make much more sense, the only issue with that is we have to persist the data somehow as a failsafe incase something happens to the server.

ctf0 avatar Oct 17 '16 09:10 ctf0