mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Added primary key to perf_times to improve DELETE performance on replicas using ROW based replication (#7493)
* fix: Added primary key to perf_times to improve DELETE performance on replicas using ROW based replication * moved sql file * moved sql file * Rebased * fixed schema * moved sql file
This commit is contained in:
@@ -997,6 +997,7 @@ pdb_ix_peers:
|
||||
PRIMARY: { Name: PRIMARY, Columns: [pdb_ix_peers_id], Unique: true, Type: BTREE }
|
||||
perf_times:
|
||||
Columns:
|
||||
- { Field: id, Type: int(11), 'Null': false, Extra: auto_increment }
|
||||
- { Field: type, Type: varchar(8), 'Null': false, Extra: '' }
|
||||
- { Field: doing, Type: varchar(64), 'Null': false, Extra: '' }
|
||||
- { Field: start, Type: int(11), 'Null': false, Extra: '' }
|
||||
@@ -1004,6 +1005,7 @@ perf_times:
|
||||
- { Field: devices, Type: int(11), 'Null': false, Extra: '' }
|
||||
- { Field: poller, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
Indexes:
|
||||
PRIMARY: { Name: PRIMARY, Columns: [id], Unique: true, Type: BTREE }
|
||||
type: { Name: type, Columns: [type], Unique: false, Type: BTREE }
|
||||
plugins:
|
||||
Columns:
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
ALTER TABLE `config` CHANGE `config_group_order` `config_group_order` INT(11) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `config` CHANGE `config_sub_group_order` `config_sub_group_order` INT(11) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `config` CHANGE `config_sub_group_order` `config_sub_group_order` INT(11) NOT NULL DEFAULT 0;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
TRUNCATE `perf_times`;
|
||||
ALTER TABLE `perf_times` ADD COLUMN `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
|
||||
Reference in New Issue
Block a user