Author Topic: How to delete queue_log records  (Read 5688 times)

netsolcr

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
How to delete queue_log records
« on: October 10, 2007, 02:44:50 »
Hello...

One agent misslogged in to a queue, so that logged to queue 2080 with agent 2080. It seems that this caused some king of loop. As a consecuense I'm getting a huge number of calls affecting my statistics.

I feel confident that deleting those records will solve my problem. From MySQL y preceed to delete those records, however Queuemetrics reports continue showing statistics for agent 2080, so I restored MySQL database.

How can I get rid of those records?

Thanks in advance for your help.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: How to delete queue_log records
« Reply #1 on: October 10, 2007, 15:33:04 »
Deleting them from MySQL will suffice. If QM is still showing those calls, it means you forgot some  ;)

netsolcr

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: How to delete queue_log records
« Reply #2 on: October 11, 2007, 18:03:00 »
Please take a look at the report before deleting records:

Agents on queue   
Agent/2080    1885    32.0%    


Querey I'm running in MySQL:
SELECT * FROM `queuemetrics`.`queue_log`
where queue = 2080 and agent like '%2080%'


above query retunrns "3766 rows feched"

then I modify the query as follows:

DELETE FROM `queuemetrics`.`queue_log`
where queue = 2080 and agent like '%2080%'


result:  3766 rows affected by the last command, no resulset returned

So I go back to Queuemetrics reporter, refresh the sesion and run report again...
Please look at the new report results:

Agents on queue   
 Agent/2080     1885      32.0%


As you can see, there is no change in reports after deleting unwanted records.
Am I missing something? should I restart any service? or run any additional process?

Thanks a lot for your help.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: How to delete queue_log records
« Reply #3 on: October 12, 2007, 08:58:04 »
Try this:
- look at one of those calls (in QueueMetrics, click on "call detail" and find the caller_id)
- search for that caller_id in the queue_log table (and you'll find one or more call id's)
- select all rows with those call id's

This should make it clear why you're still seeing that agent.


netsolcr

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: How to delete queue_log records
« Reply #4 on: October 18, 2007, 19:38:14 »
 ::)

I found many caller_ids in queuemetrics details (some blank); I went to queue_log table in order to find out those records, however this table does not have a caller_id column.

On the other hand.... I realized that a single call if not abandoned would write 3 records in the queue_log table, one of which ones has 'NONE' on agent column. I mean, I previously deleted records where queue = 2080 and agent like '%2080%', so that I missed deleting some records related to affected calls. Well, I already grouped, counted and deleted call_ids < 2 with no changes in queuemetrics reports.

Unwanted records in report:

Agent/2040*    7    0.1%    
Agent/2050    48    0.8%    
Agent/2070    50    0.9%    
Agent/2080    1885    32.7%    
Agent/3562    28    0.5%    

Thanks for your reply.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: How to delete queue_log records
« Reply #5 on: October 21, 2007, 13:42:20 »
What you say is pretty rough (what gets written is far subtler than what you say) but... is it okay now?

netsolcr

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: How to delete queue_log records
« Reply #6 on: October 22, 2007, 16:35:33 »
No, it's not OK!!!

Agents on queue
Agent       N. Calls       
   ...
Agent #1   455    7.9%    
Agent #2   491    8.5%    
Agent #3   151    2.6%    
Agent #4   1    0.0%    
Agent #5    477    8.3%    
Agent #6    259    4.5%    
Agent #7   370    6.4%    
Agent #7    85    1.5%    
Agent #8   628    10.9%    
Agent #9    356    6.2%    
Agent #10    432    7.5%    
Agent #11    0.7%    
Agent/2050    39    0.7%    
Agent/2070    50    0.9%    
Agent/2080    1885    32.8%    
Agent/3562    28    0.5%    


In bold records which I want to get rid of.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: How to delete queue_log records
« Reply #7 on: October 24, 2007, 09:40:41 »
I'd do something like:

Code: [Select]
SELECT DISTINCT call_id FROM `queue_log` WHERE agent = 'agent/101'
and get a list of call_id's to delete.

Then

Code: [Select]
DELETE FROM queue_log WHERE call_id IN ( ...... );
where '....' is your list of call_ids. This should do the trick.