How Do I Keep The Size Of My Database Down Automatically?, My database is extremely large, is there a way to reduce the size? |
How Do I Keep The Size Of My Database Down Automatically?, My database is extremely large, is there a way to reduce the size? |
Jun 14 2006, 07:07 PM
Post
#1
|
|
WSF Commander Group: Admin Posts: 4,662 Joined: 26-August 05 Member No.: 10 |
SYMPTOMS
My database is extremely large, is there a way to reduce the size automatically rather than running the optimizer regularly? CAUSE There are a number of tables in your database with the postfix _tracking, these tables store temporary information that is used for performance processing and statistics. SOLUTION None of this data is required for more than 8 days and can safely be removed via a cron job or other similar process. Run following SQL daily to remove the old data from your tables: traffic exchange + text exchange + banner exchange SQL DELETE FROM vtp_tracking WHERE action_date < DATE_SUB(CURDATE(),INTERVAL 14 DAY) SQL DELETE FROM vtp_text_tracking WHERE action_date < DATE_SUB(CURDATE(),INTERVAL 14 DAY) SQL DELETE FROM vtp_bnr_tracking WHERE action_date < DATE_SUB(CURDATE(),INTERVAL 14 DAY) text exchange: SQL DELETE FROM vte_tracking WHERE action_date < DATE_SUB(CURDATE(),INTERVAL 14 DAY) banner exchange: SQL DELETE FROM vbe_tracking WHERE action_date < DATE_SUB(CURDATE(),INTERVAL 14 DAY) link tracking exchange: SQL DELETE FROM vtl_tracking WHERE action_date < DATE_SUB(CURDATE(),INTERVAL 14 DAY)
|
|
|
Lo-Fi Version | Time is now: 2nd November 2024 - 01:27 AM |