mirror of https://github.com/sipwise/db-schema.git
Used by witnessd:
MariaDB [(none)]> explain SELECT sip_code, amount FROM stats.call_info WHERE period = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 HOUR), '%Y-%m-%d %H:00:00');
+------+-------------+-----------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+-----------+------+---------------+------+---------+------+------+-------------+
| 1 | SIMPLE | call_info | ALL | NULL | NULL | NULL | NULL | 1 | Using where |
+------+-------------+-----------+------+---------------+------+---------+------+------+-------------+
1 row in set (0.000 sec)
Change-Id: I3e0d65434fe5d4754993f5924c8d286e76491a77
mr26.3
parent
a433def8a4
commit
f2204ef604
@ -0,0 +1 @@
|
||||
alter table stats.call_info drop key call_info_period_sip_code_idx;
|
||||
@ -0,0 +1 @@
|
||||
alter table stats.call_info add key call_info_period_sip_code_idx (period, sip_code);
|
||||
Loading…
Reference in new issue