Query Locking the vicidial_log table

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Query Locking the vicidial_log table

Postby alo » Fri Jan 27, 2023 1:14 pm

We have a new query we see locking the vicidial_log table and causing issues.

We have a slave database and have all the reports using it, I am thinking its some automation that checks hourly stats or something but it seems to have just started happening.
I also have been using the archive log script with days=1 to keep the log table as small as possible but its still locking.

Does anyone know whats running this query and why?

SVN 3594


SELECT CONCAT(substr(call_date, 1, 13), ':00:00') as hour_int, count(*), CONCAT(substr(call_date+INTERVAL 1 HOUR, 1, 13), ':00:00') as next_hour from vicidial_log FORCE INDEX (call_date) where campaign_id='CAMPAIGN1' and call_date >= '2023-01-27 09:00:00' and status IN('DROP','XDROP','CALLBK','CBHOLD','DEC','DNC','SALE','NI','NP','XFER','RQXFER','TIMEOT','AFTHRS','NANQUE','PDROP','IVRXFR','SVYCLM','MLINAT','MAXCAL','LRERR','QCFAIL','WN','TEST','CBL','DNCR','DA','FR','OptOUT','UTCB') and user != 'VDAD' group by hour_int, next_hour order by hour_int

and also

SELECT count(*) from vicidial_log FORCE INDEX (call_date) where campaign_id='CAMPAIGN1' and call_date > '2023-01-27 9:9:37' and status IN('DROP','XDROP','CALLBK','CBHOLD','DEC','DNC','SALE','NI','NP','XFER','RQXFER','TIMEOT','AFTHRS','NANQUE','PDROP','IVRXFR','SVYCLM','MLINAT','MAXCAL','LRERR','QCFAIL','WN','TEST','CBL','DNCR','DA','FR')


Thank you!
alo
 
Posts: 187
Joined: Wed Jun 20, 2012 10:21 am

Re: Query Locking the vicidial_log table

Postby mflorell » Fri Jan 27, 2023 5:59 pm

That's the "AST_VDadapt.pl" script running those queries. I've never had a problem with large high-volume clients and that script if they are archiving their logs regularly, unless they have inadequate hardware or settings for their DB server.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: No registered users and 67 guests