mirror of https://github.com/sipwise/db-schema.git
parent
f72cccd863
commit
3f2d4e20eb
@ -0,0 +1,14 @@
|
||||
use sipstats;
|
||||
|
||||
alter table packets remove partitioning;
|
||||
alter table packets drop primary key, drop key uniq,
|
||||
add primary key (id, timestamp), add unique key (timestamp, src_mac, dst_mac, header(80));
|
||||
alter table packets partition by range (floor(timestamp)) (partition pmax values less than maxvalue);
|
||||
|
||||
alter table messages remove partitioning;
|
||||
alter table messages drop primary key, drop key timestamp, add primary key (id, timestamp);
|
||||
alter table messages partition by range (floor(timestamp)) (partition pmax values less than maxvalue);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
use sipstats;
|
||||
|
||||
alter table packets remove partitioning;
|
||||
alter table packets drop primary key, drop key timestamp,
|
||||
add primary key (id), add key uniq (timestamp, src_mac, dst_mac, header(80));
|
||||
alter table packets partition by range (id) (partition pmax values less than maxvalue);
|
||||
|
||||
alter table messages remove partitioning;
|
||||
alter table messages drop primary key, add primary key (id), add key (timestamp);
|
||||
alter table messages partition by range (id) (partition pmax values less than maxvalue);
|
||||
Loading…
Reference in new issue