added indexes for improved speed

This commit is contained in:
Matthias@Dell 2023-06-26 20:50:18 +02:00
parent 10579bbb42
commit f075408641

View File

@ -77,3 +77,9 @@ CREATE TABLE IF NOT EXISTS country(
name TEXT UNIQUE,
code TEXT UNIQUE
) STRICT;
-- indexes for rankings
CREATE INDEX visitors_human_idx ON visitor(is_human);
CREATE INDEX visitors_ip_range_idx ON visitor(ip_range_id);
CREATE INDEX visitors_ip_range_human_idx ON visitor(is_human, ip_range_id);
CREATE INDEX requests_visitor_time_idx ON request(visitor_id, time);