Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QUERY
- -----
- SELECT id,
- date,
- Floor(micro_ts / 1000) AS milli_ts,
- micro_ts,
- method,
- reply_reason,
- ruri,
- ruri_user,
- ruri_domain,
- from_user,
- from_domain,
- from_tag,
- to_user,
- to_domain,
- to_tag,
- pid_user,
- contact_user,
- auth_user,
- callid,
- callid_aleg,
- via_1,
- via_1_branch,
- cseq,
- diversion,
- reason,
- content_type,
- auth,
- user_agent,
- source_ip,
- source_port,
- destination_ip,
- destination_port,
- contact_ip,
- contact_port,
- originator_ip,
- originator_port,
- correlation_id,
- proto,
- family,
- rtp_stat,
- type,
- node,
- custom_field1,
- custom_field2,
- custom_field3,
- msg
- FROM sip_capture_call_20181219
- WHERE ( date BETWEEN From_unixtime(1545231736) AND From_unixtime(1545236093) )
- AND (( callid = '61858b0d6ccd67e60b3a9dfa5ea19b53@voips-ng.modulus.gr'
- OR callid = '459774299@192_168_1_8' ))
- ORDER BY id DESC
- LIMIT 200;
- QUERY EXPLAIN
- -------------
- EXPLAIN SELECT id, date, floor(micro_ts /1000) as milli_ts, micro_ts,method,reply_reason,ruri,ruri_user,ruri_domain,from_user,from_domain,from_tag, to_user,to_domain,to_tag,pid_user,contact_user,auth_user,callid,callid_aleg,via_1,via_1_branch,cseq,diversion,reason,content_type,auth, user_agent,source_ip,source_port,destination_ip,destination_port,contact_ip,contact_port,originator_ip,originator_port,correlation_id,proto,family,rtp_stat,type,node,custom_field1,custom_field2,custom_field3,msg FROM sip_capture_call_20181219 WHERE (date BETWEEN FROM_UNIXTIME(1545231736) AND FROM_UNIXTIME(1545236093)) AND ( ( callid = '61858b0d6ccd67e60b3a9dfa5ea19b53@voips-ng.modulus.gr' OR callid = '459774299@192_168_1_8' )) ORDER BY id DESC LIMIT 200;
- +------+-------------+---------------------------+-------+---------------+---------+---------+------+---------+-------------+
- | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
- +------+-------------+---------------------------+-------+---------------+---------+---------+------+---------+-------------+
- | 1 | SIMPLE | sip_capture_call_20181219 | index | date,callid | PRIMARY | 12 | NULL | 3193959 | Using where |
- +------+-------------+---------------------------+-------+---------------+---------+---------+------+---------+-------------+
- 1 row in set (0.002 sec)
- QUERY EXPLAIN WITHOUT ORDER BY CLAUSE
- -------------------------------------
- EXPLAIN SELECT id, date, floor(micro_ts /1000) as milli_ts, micro_ts,method,reply_reason,ruri,ruri_user,ruri_domain,from_user,from_domain,from_tag, to_user,to_domain,to_tag,pid_user,contact_user,auth_user,callid,callid_aleg,via_1,via_1_branch,cseq,diversion,reason,content_type,auth, user_agent,source_ip,source_port,destination_ip,destination_port,contact_ip,contact_port,originator_ip,originator_port,correlation_id,proto,family,rtp_stat,type,node,custom_field1,custom_field2,custom_field3,msg FROM sip_capture_call_20181219 WHERE (date BETWEEN FROM_UNIXTIME(1545231736) AND FROM_UNIXTIME(1545236093)) AND ( ( callid = '61858b0d6ccd67e60b3a9dfa5ea19b53@voips-ng.modulus.gr' OR callid = '459774299@192_168_1_8' )) LIMIT 200;
- +------+-------------+---------------------------+-------+---------------+--------+---------+------+------+-------------+
- | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
- +------+-------------+---------------------------+-------+---------------+--------+---------+------+------+-------------+
- | 1 | SIMPLE | sip_capture_call_20181219 | range | date,callid | callid | 362 | NULL | 44 | Using where |
- +------+-------------+---------------------------+-------+---------------+--------+---------+------+------+-------------+
- 1 row in set (0.002 sec)
- SHOW CREATE TABLE
- -----------------
- show create table sip_capture_call_20181219;
- +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Table | Create Table |
- +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | sip_capture_call_20181219 | CREATE TABLE `sip_capture_call_20181219` (
- `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
- `date` timestamp NOT NULL DEFAULT current_timestamp(),
- `micro_ts` bigint(18) NOT NULL DEFAULT 0,
- `method` varchar(50) NOT NULL DEFAULT '',
- `reply_reason` varchar(100) NOT NULL DEFAULT '',
- `ruri` varchar(200) NOT NULL DEFAULT '',
- `ruri_user` varchar(100) NOT NULL DEFAULT '',
- `ruri_domain` varchar(150) NOT NULL DEFAULT '',
- `from_user` varchar(100) NOT NULL DEFAULT '',
- `from_domain` varchar(150) NOT NULL DEFAULT '',
- `from_tag` varchar(64) NOT NULL DEFAULT '',
- `to_user` varchar(100) NOT NULL DEFAULT '',
- `to_domain` varchar(150) NOT NULL DEFAULT '',
- `to_tag` varchar(64) NOT NULL DEFAULT '',
- `pid_user` varchar(100) NOT NULL DEFAULT '',
- `contact_user` varchar(120) NOT NULL DEFAULT '',
- `auth_user` varchar(120) NOT NULL DEFAULT '',
- `callid` varchar(120) NOT NULL DEFAULT '',
- `callid_aleg` varchar(120) NOT NULL DEFAULT '',
- `via_1` varchar(256) NOT NULL DEFAULT '',
- `via_1_branch` varchar(80) NOT NULL DEFAULT '',
- `cseq` varchar(25) NOT NULL DEFAULT '',
- `diversion` varchar(256) NOT NULL DEFAULT '',
- `reason` varchar(200) NOT NULL DEFAULT '',
- `content_type` varchar(256) NOT NULL DEFAULT '',
- `auth` varchar(256) NOT NULL DEFAULT '',
- `user_agent` varchar(256) NOT NULL DEFAULT '',
- `source_ip` varchar(60) NOT NULL DEFAULT '',
- `source_port` int(10) NOT NULL DEFAULT 0,
- `destination_ip` varchar(60) NOT NULL DEFAULT '',
- `destination_port` int(10) NOT NULL DEFAULT 0,
- `contact_ip` varchar(60) NOT NULL DEFAULT '',
- `contact_port` int(10) NOT NULL DEFAULT 0,
- `originator_ip` varchar(60) NOT NULL DEFAULT '',
- `originator_port` int(10) NOT NULL DEFAULT 0,
- `expires` int(5) NOT NULL DEFAULT -1,
- `correlation_id` varchar(256) NOT NULL DEFAULT '',
- `custom_field1` varchar(120) NOT NULL DEFAULT '',
- `custom_field2` varchar(120) NOT NULL DEFAULT '',
- `custom_field3` varchar(120) NOT NULL DEFAULT '',
- `proto` int(5) NOT NULL DEFAULT 0,
- `family` int(1) DEFAULT NULL,
- `rtp_stat` varchar(256) NOT NULL DEFAULT '',
- `type` int(2) NOT NULL DEFAULT 0,
- `node` varchar(125) NOT NULL DEFAULT '',
- `msg` varchar(3000) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`,`date`),
- KEY `ruri_user` (`ruri_user`),
- KEY `from_user` (`from_user`),
- KEY `to_user` (`to_user`),
- KEY `pid_user` (`pid_user`),
- KEY `auth_user` (`auth_user`),
- KEY `callid_aleg` (`callid_aleg`),
- KEY `date` (`date`),
- KEY `callid` (`callid`),
- KEY `method` (`method`),
- KEY `source_ip` (`source_ip`)
- ) ENGINE=InnoDB AUTO_INCREMENT=9595781 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 COMMENT='20181219'
- PARTITION BY RANGE (unix_timestamp(`date`))
- (PARTITION `p2018121900` VALUES LESS THAN (1545264000) ENGINE = InnoDB,
- PARTITION `pmax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB) |
- +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- 1 row in set (0.001 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement