]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
importer: ANALYZE all tables before we are running the export
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 18 Mar 2024 16:52:26 +0000 (16:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 18 Mar 2024 16:52:26 +0000 (16:52 +0000)
This should help the query planner to make better decisions when
planning the large queries.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in

index cc66414d579de8013d8ba58352b85e49a58af838..766d8835eccaca032ad6ceb78a6f800d4146c3dd 100644 (file)
@@ -336,6 +336,9 @@ class CLI(object):
                if ns.license:
                        writer.license = ns.license
 
+               # Analyze everything for the query planner hopefully making better decisions
+               self.db.execute("ANALYZE")
+
                # Add all Autonomous Systems
                log.info("Writing Autonomous Systems...")