feat: database add index to ua field

This commit is contained in:
Emil Zhai 2022-12-04 09:26:09 +00:00
parent eee11fc919
commit 7fbbbbd7f4
No known key found for this signature in database
GPG Key ID: 780B385DB72F1EBD
2 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,7 @@ CREATE TABLE `typecho_access_logs` (
PRIMARY KEY (`id`),
KEY `idx_time` (`time` ),
KEY `idx_path` (`path` ),
KEY `idx_ua` (`ua` ),
KEY `idx_ip_ua` (`ip`,`ua` ),
KEY `idx_robot` (`robot`, `time` ),
KEY `idx_os_id` (`os_id` ),

View File

@ -25,6 +25,7 @@ CREATE TABLE `typecho_access_logs` (
);
CREATE INDEX `typecho_access_log_time` ON `typecho_access_log` (`time` );
CREATE INDEX `typecho_access_log_path` ON `typecho_access_log` (`path` );
CREATE INDEX `typecho_access_log_ua` ON `typecho_access_log` (`ua` );
CREATE INDEX `typecho_access_log_ip_ua` ON `typecho_access_log` (`ip`, `ua` );
CREATE INDEX `typecho_access_log_robot` ON `typecho_access_log` (`robot`, `time` );
CREATE INDEX `typecho_access_log_os_id` ON `typecho_access_log` (`os_id` );