Commit fb2ebf06 authored by Camil Staps's avatar Camil Staps 🐧

Add indexes to the log table to speed up search for blacklisting

parent 6af3b02d
Pipeline #33829 passed with stages
in 21 minutes and 40 seconds
......@@ -22,7 +22,9 @@ CREATE TABLE IF NOT EXISTS `blacklist` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `log`
ADD KEY `useragent_id` (`useragent_id`);
ADD KEY `useragent_id` (`useragent_id`),
ADD KEY `ip` (`ip`),
ADD KEY `useragent_id_ip` (`useragent_id`,`ip`);
ALTER TABLE `useragent`
ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `ua_hash` (`ua_hash`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment