Page view Statistics remove

Permalink 2 users found helpful
Hello
Previously the Page View Statistics options was enabled in my website. But Due to speedup the site, I've disabled it. Everything is fine though but my concern is with the DB records stored in PageStatistics table. I can see that there are near about 95 thousands of data stored in the table. I think its totally wastage of DB space. It should remove the data while disabling this option. Isn't it?

Rony

ronyDdeveloper
View Replies: View Best Answer
shahroq replied on at Permalink Reply
shahroq
It doesn't sound logical to delete all records from the db when user disable the Statistics. you can do the job manually by executing this statements at mysql (phpMyAdmin or something)
TRUNCATE `PageStatistics`;
OPTIMIZE TABLE `PageStatistics`;
jshannon replied on at Permalink Reply
jshannon
I dunno. I'd say it should automatically remove, or at least give you the option to remove.

Many c5 users aren't comfortable with SQL, or even phpmyadmin. It's a reasonable assumption that if they turn off page statistics, they don't want/need the data.

With that being said, I don't know how much a unused table affects speed. The biggest problem is probably with backups/migrations.
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
I do fully agree with jshannon. Its not a case that all the people must have knowledge of MySQL. So there should be an option to remove the unwanted data from dashboard.

Rony
shahroq replied on at Permalink Reply
shahroq
maybe have an option in setting to clear the table would be cool, but truncate table on disabling, makes no sense.
rayjohn66 replied on at Permalink Reply
On on this link cause I was researching why I could no longer do an update. Turns out I have over 300,000 records in this Page Statictics and Logs is a close second, accounting for over 30meg of db space. Just trying to figure out the best plan of action before I just empty the table. MyphpAdmin sorting by table size at least told me where my problem is.
shahroq replied on at Permalink Reply
shahroq
just get a backup of this table (if you think you will need data), then TRUNCATE the table (with above statements).
rayjohn66 replied on at Permalink Reply
Thanks, just did that and can now make a backup without timing out.