[UPDATE] Added indexes for share archive
This commit is contained in:
parent
68958fb7bf
commit
b09d27a7cc
@ -157,7 +157,9 @@ CREATE TABLE IF NOT EXISTS `shares_archive` (
|
|||||||
`time` datetime NOT NULL,
|
`time` datetime NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `share_id` (`share_id`),
|
UNIQUE KEY `share_id` (`share_id`),
|
||||||
KEY `time` (`time`)
|
KEY `time` (`time`),
|
||||||
|
KEY `our_result` (`our_result`),
|
||||||
|
KEY `username` (`username`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Archive shares for potential later debugging purposes';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Archive shares for potential later debugging purposes';
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `statistics_shares` (
|
CREATE TABLE IF NOT EXISTS `statistics_shares` (
|
||||||
|
|||||||
4
sql/008_shares_archive_optimization.sql
Normal file
4
sql/008_shares_archive_optimization.sql
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE `shares_archive` ADD INDEX ( `username` ) ;
|
||||||
|
ALTER TABLE `shares_archive` ADD INDEX ( `share_id` ) ;
|
||||||
|
ALTER TABLE `shares_archive` ADD INDEX ( `our_result` ) ;
|
||||||
|
ALTER TABLE `shares_archive` ADD INDEX ( `time` ) ;
|
||||||
Loading…
Reference in New Issue
Block a user