vicidial_manager as memory table - high query time
Posted: Mon Nov 23, 2015 9:17 am
Hi,
I am chasing a few issues and noticed at slow queries log file often occurrences of this:
Query_time: 6.867697 and Rows_examined: 6904662 are worrying me.
vicidial_manager had been converted to memory table quite a while ago, before I started looking after this cluster and every time I've checked it has like 30-40000 entries in it, nothing like several millions.
What could be the reason for a query to a memory table to take this long and show Rows_examined: 6904662 ?
Any hints?
I am chasing a few issues and noticed at slow queries log file often occurrences of this:
- Code: Select all
# Time: 151120 14:10:08
# User@Host: cron[cron] @ [10.2.1.13]
# Query_time: 6.867697 Lock_time: 0.001789 Rows_sent: 0 Rows_examined: 6904662
SET timestamp=1448028608;
delete from vicidial_manager where server_ip='10.2.1.13' and entry_date < '2015-11-20 13:10:01';
Query_time: 6.867697 and Rows_examined: 6904662 are worrying me.
vicidial_manager had been converted to memory table quite a while ago, before I started looking after this cluster and every time I've checked it has like 30-40000 entries in it, nothing like several millions.
- Code: Select all
CREATE TABLE `vicidial_manager` (
`man_id` INT(9) UNSIGNED NOT NULL AUTO_INCREMENT,
`uniqueid` VARCHAR(20) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`entry_date` DATETIME NULL DEFAULT NULL,
`status` ENUM('NEW','QUEUE','SENT','UPDATED','DEAD') NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`response` ENUM('Y','N') NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`server_ip` VARCHAR(15) NOT NULL COLLATE 'utf8_unicode_ci',
`channel` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`action` VARCHAR(20) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`callerid` VARCHAR(20) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_b` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_c` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_d` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_e` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_f` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_g` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_h` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_i` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_j` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
`cmd_line_k` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
PRIMARY KEY (`man_id`),
INDEX `callerid` (`callerid`),
INDEX `uniqueid` (`uniqueid`),
INDEX `serverstat` (`server_ip`, `status`),
INDEX `server_action_cmd` (`server_ip`, `action`, `entry_date`) USING BTREE
)
COLLATE='utf8_unicode_ci'
ENGINE=MEMORY
AUTO_INCREMENT=8370035
;
What could be the reason for a query to a memory table to take this long and show Rows_examined: 6904662 ?
Any hints?