-
My database table wp_fv_player_stats is now 1.6 GB.
How do I clean or trim FV Player Stats from my database?
Any help would be appreciated.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
Foliovision › Forums › FV Player › How to … › How To Delete or Trim FV Player Stats from Database?
Hello Jovan,
If you really need to trim the data right now, you can run the following SQL query to delete data older than 1 month:
DELETE FROM wp_fv_player_stats WHERE date < DATE_SUB( NOW(), INTERVAL 1 MONTH ) LIMIT 100000;
The query only removes 100,000 rows, so you will have to run it several times. This is a precaution as without the limit it might take even minutes to finish, during which the video tracking requests would not work and hold up your server PHP processes, which could result in your website slowing down if you get several video plays every minute.
Once it has finished it’s good to optimize the table with: OPTIMIZE TABLE wp_fv_player_stats;
We would like to add an optimization routine right in FV Player. I think it would be great if it would aggregate the old data to a new table where the dates would be changed from exact days to months. That way FV Player could store a lot of historical data.
Thanks,
Martin
Hello Jovan,
Please let us know how many unique users does your website have. I mean the users which show in wp-admin -> Users.
How many players do you have in wp-admin -> FV Player?
How many posts with FV Player videos do you have approximately?
Are you using wp-admin -> FV Player -> Settings -> Stats -> Track Guest User IDs?
Thanks,
Martin