Hosted Vicidial server starts from $39 Contact Us Buy Now!

How to vicidial database maintenance

Estimated read time: 1 min

How to delete old call logs and datas from vicidial database


vicidial database maintenance



reference:vicidial.org • View topic - DATABASE Maintainance

|VICIdial Open-Source Contact Center Suite


Vicidial is an enterprise class, open source, contact center suite in use by many large call centers around the world. VICIdial has a full featured predictive dialer.  It is capable of inbound, outbound, and blended phone call handling. 

In this Blog i will be showing you step to delete old logs in database.


change the date accordingly as per your requirement.

SELECT count(*) from call_log;
SELECT count(*) from call_log_archive;
INSERT IGNORE INTO call_log_archive SELECT * from call_log;
DELETE FROM call_log WHERE start_time < '2008-03-01 01:00:00';
optimize table call_log;
DELETE from call_log_archive where channel LIKE"Local/9%" and extension not IN(' 8365','8366','8367','8368') and caller_code LIKE "V%" and length_in_sec < 75 and start_time < '2008-03-01 01:00:00';
optimize table call_log_archive;


SELECT count(*) from vicidial_log;
SELECT count(*) from vicidial_log_archive;
INSERT IGNORE INTO vicidial_log_archive SELECT * from vicidial_log;
DELETE FROM vicidial_log WHERE call_date < '2008-03-01 01:00:00';
optimize table vicidial_log;
optimize table vicidial_log_archive;

SELECT count(*) from server_performance;
DELETE FROM server_performance WHERE start_time < '2008-03-01 01:00:00';
optimize table server_performance;

SELECT count(*) from vicidial_agent_log;
SELECT count(*) from vicidial_agent_log_archive;
INSERT IGNORE INTO vicidial_agent_log_archive SELECT * from vicidial_agent_log;
DELETE FROM vicidial_agent_log WHERE event_time < '2008-03-01 01:00:00';
optimize table vicidial_agent_log;
optimize table vicidial_agent_log_archive;

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.