My Counter table is now over 80MB and 800K rows, and is slowing down my system.
Is it supposed to be pruned, and how?

Thanks

Comments

drupalnesia’s picture

There is no feature to delete the table content right now, I will include in the next version. For temporary solution you can empty counter table using PHPMyAdmin, the table name is: "counter" (do not delete "counter_data" table)

After deleting then you counter data such as "number of Visitor" still available because saved into different table ("counter_data"), but you will lost Visitor Statistic that available since 6.x-2.7. Also Counter reporting will have no data.

vako’s picture

Where should I look in phpMyAdmin to find the size of the table? I can only see the rows.

Also there is an EMPTY and DROP options, can we use them on the counter table safely?

tian’s picture

Don't use DROP: it will delete the table itself, not only its content.

Actually, I EMPTYed the counter table, and my counter got reset to zero :(
Had do restore the DB.

vako’s picture

So is there a way to keep a certain amount of data in it and purge the rest? e.g.: instead of keeping all the IP addresses and other information in the DB, I need only the final numbers incremented. Actually the DB should always stay minimal and never grow...

Katrina B’s picture

Subscribing.

I would really like to use the functionality in this module ... I'm looking for a way to track the number of unique visitors at any given moment.

But I need to be able to limit the size of the DB. We get several thousand visitors a day, and I can't afford to have a growing DB slowing down the site (we've already put an awful lot of time and energy into increasing the page load speed of the site). Being able to limit the log entries to, say, a week would be great.

The Activity module and Visitors module both offer the ability to limit the log entries to a given amount of time (such as a week); I'd like to see the same ability offered in the Counter module.

vodoleq’s picture

Subscribing

nfriend’s picture

My page loads had gone to 20+seconds with a site having about 25K nodes. I just thought Drupal was slow! Then I was browsing my SQL tables and saw that the counter table had 1.8 million records in it.

I had stopped looking at these numbers as for my purposes they just didn't seem to coincide with Google Analytics but I never removed the module.

Once I turned the Counter module OFF - my pages loads are under 2 seconds!

For my purposes I will need to keep it off.

Neil

drupalnesia’s picture

Status: Active » Fixed

6.x-2.12: New: Option to save counting data only without any details thus avoid table size increased

In this new option, Counter module introduced new table: counter_today. The counter_today table only record visitor per day and empty counter_today table daily. The result will save to counter_data table. This answer #4 request by Vako.

Then I was browsing my SQL tables and saw that the counter table had 1.8 million records in it.

This mean your site has huge access. If you only need Summary of your website visitor then option to "Save details data = No" is the answer, by default it is set to "No".

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

srikanth.g’s picture

Version: 6.x-2.6 » 7.x-1.x-dev
Issue summary: View changes

In my drupal 6.14 site there are 12 lakhs records in counter table,how it will effect my site performance? is there a way to delete duplicate records? don't wanted to maintain repeatd IP addresses in DB.