]> git.ipfire.org Git - people/ms/libloc.git/commit
importer: Improve performance of network export query
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Mar 2022 10:29:11 +0000 (10:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Mar 2022 10:29:11 +0000 (10:29 +0000)
commit295a7774d98aa866da19acaafb9d04689d674440
tree418f5b3eff4311dbf73894f292c15ee066973a18
parent3df5f70a270bcf6de693cfc1dab51597420f34a2
importer: Improve performance of network export query

This patch moves the subqueries out of the large query, so that the
database will materialize them for faster lookup.

We also drop the "UNION ALL" and replace it with just "UNION" because we
do not want any duplicate networks. That will save us many iterations
later on.

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