[7/8] location-importer.in: Create gist index for announcement table as well
Commit Message
This speeds up exporting the database as it avoits a sequential scan.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
src/python/location-importer.in | 1 +
1 file changed, 1 insertion(+)
@@ -152,6 +152,7 @@ class CLI(object):
last_seen_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP);
CREATE UNIQUE INDEX IF NOT EXISTS announcements_networks ON announcements(network);
CREATE INDEX IF NOT EXISTS announcements_family ON announcements(family(network));
+ CREATE INDEX IF NOT EXISTS announcements_search ON announcements USING GIST(network inet_ops);
-- autnums
CREATE TABLE IF NOT EXISTS autnums(number bigint, name text NOT NULL);