mirror of https://github.com/sipwise/db-schema.git
parent
65a6c2c90f
commit
f0cc0a0246
@ -1,6 +1,6 @@
|
|||||||
use sipstats;
|
use sipstats;
|
||||||
alter table statistics remove partitioning;
|
alter table statistics remove partitioning;
|
||||||
set @stm = concat('alter table statistics partition by range (floor(timestamp)) (partition p_old values less than (', unix_timestamp() + 600, '))');
|
set @stm = concat('alter table statistics partition by range (floor(timestamp)) (partition p_old values less than (', coalesce((select floor(max(timestamp)) from statistics), 0) + 600, '))');
|
||||||
prepare st from @stm;
|
prepare st from @stm;
|
||||||
execute st;
|
execute st;
|
||||||
deallocate prepare st;
|
deallocate prepare st;
|
||||||
|
Loading…
Reference in new issue