From patchwork Tue Sep 27 16:48:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 6021 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4McQZ34LsSz3wwb for ; Tue, 27 Sep 2022 16:48:59 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4McQZ12wM1z2Y7; Tue, 27 Sep 2022 16:48:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4McQZ04Z9Jz30Vf; Tue, 27 Sep 2022 16:48:56 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4McQYz2wKpz2xNS for ; Tue, 27 Sep 2022 16:48:55 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4McQYz1WTczh6; Tue, 27 Sep 2022 16:48:55 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1664297335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BWMCUTXaOEboIYjlIoMrY6QTQizO6l7kgSom/gQEAfQ=; b=AJx4KnjDWOc6DFv4o2PnpMzZ+JsGFvAdxjydmbI5rQ/3AGwMccvPnfBISVuJrLuf8YKnWK 0UplR746a9ksjzCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1664297335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BWMCUTXaOEboIYjlIoMrY6QTQizO6l7kgSom/gQEAfQ=; b=WQppEZVZBR4k4R7WnjPd/VWbIXT0Sqlp+bfLDy7mvdo/d/BJuHIfQr7rRctc7quMoB+fqP TCev+mrovBK098jINve7x8qPqVYMrKFCxb+HjOnYgCXX4e/XXyHRdpUM7H6G5hJSCeGxLI 9iYIR1F+SdG6LV2OsfwY8juJTJjIMefvsdjE+8lGn2E+xBkNHFmiaum30t3alhhc4x7nTB J0dBFHQjBWjQ9VU+hKkfqAqv3Ov+AaJOa9B7xO/BxjqZJvJZtri8thynq9RDOOYWkG9g8/ DFfpBGdFVJ3B3RALqQO398WtKtLCpMFmU1v5HbroKMznqmrym1q4kA5K+P8hsQ== From: Michael Tremer To: location@lists.ipfire.org Subject: [PATCH 07/10] importer: Add a search index match geofeed networks quicker Date: Tue, 27 Sep 2022 16:48:44 +0000 Message-Id: <20220927164847.3409646-7-michael.tremer@ipfire.org> In-Reply-To: <20220927164847.3409646-1-michael.tremer@ipfire.org> References: <20220927164847.3409646-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: location-bounces@lists.ipfire.org Sender: "Location" Signed-off-by: Michael Tremer --- src/scripts/location-importer.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in index 5759e0c..7e2136e 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -211,6 +211,10 @@ class CLI(object): CREATE TABLE IF NOT EXISTS network_geofeeds(network inet, url text); CREATE UNIQUE INDEX IF NOT EXISTS network_geofeeds_unique ON network_geofeeds(network); + CREATE INDEX IF NOT EXISTS network_geofeeds_search + ON network_geofeeds USING GIST(network inet_ops); + CREATE INDEX IF NOT EXISTS network_geofeeds_url + ON network_geofeeds(url); -- overrides CREATE TABLE IF NOT EXISTS autnum_overrides(