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(+)
diff --git a/src/python/location-importer.in b/src/python/location-importer.in index 4f4a46d..9946e64 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -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);