From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4E8C73858C33 for ; Sat, 30 Jul 2022 13:07:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4E8C73858C33 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-158-P1duh8UaO3qMB8or5Nh2Zg-1; Sat, 30 Jul 2022 09:07:16 -0400 X-MC-Unique: P1duh8UaO3qMB8or5Nh2Zg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 18BF5801585; Sat, 30 Jul 2022 13:07:15 +0000 (UTC) Received: from redhat.com (unknown [10.2.17.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09A0D40C1288; Sat, 30 Jul 2022 13:07:15 +0000 (UTC) Received: from fche by redhat.com with local (Exim 4.94.2) (envelope-from ) id 1oHmBW-0007Om-1H; Sat, 30 Jul 2022 09:07:14 -0400 Date: Sat, 30 Jul 2022 09:07:13 -0400 From: "Frank Ch. Eigler" To: Josef =?utf-8?B?xIxlamth?= Cc: "elfutils-devel@sourceware.org" Subject: Re: [PATCH 1/1] debuginfod: create indexes to speed up grooming Message-ID: <20220730130713.GA23943@redhat.com> References: <3605019.RUnXabflUD@dhcp107> MIME-Version: 1.0 In-Reply-To: <3605019.RUnXabflUD@dhcp107> User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2022 13:07:23 -0000 Hi - > Create indexes on _r_de and _f_de tables > to speed up delete operations called by groom() function. > Primary keys of those tables are optimalized to search rows > by buildids so delete by file and mtime attributes > has to scan the whole table. [...] By the way, another possible approach to this is could be to create those indexes only for the duration of a groom operation: Create at start, drop at end. It'd speed up a set of delete's almost as well, and also save disk space during normal operations. OTOH, the peak disk space requirement would be the same, so if the server's running low on index storage disk, it'll fail either way, so probably not worth doing this. - FChE