From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aCzCA5ADhGBN/gAAgWs5BA (envelope-from ) for ; Sat, 24 Apr 2021 13:40:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id HTb6Oo8DhGCYBwAAB5/wlQ (envelope-from ) for ; Sat, 24 Apr 2021 11:39:59 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B239D2937F for ; Sat, 24 Apr 2021 13:39:59 +0200 (CEST) Received: from localhost ([::1]:53192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laGdi-0002CM-QW for larch@yhetil.org; Sat, 24 Apr 2021 07:39:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laGdX-0002CD-Ex for guix-devel@gnu.org; Sat, 24 Apr 2021 07:39:48 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:48775) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laGdQ-0007Kj-0b for guix-devel@gnu.org; Sat, 24 Apr 2021 07:39:46 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id DA4EB27BC7C; Sat, 24 Apr 2021 12:39:36 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id e5272ee2; Sat, 24 Apr 2021 11:39:36 +0000 (UTC) References: <79d3d2e5c1386b1e162f1ba8380562720131856d.camel@telenet.be> <87tuo7xljp.fsf@cbaines.net> <87lf9ixz5j.fsf@cbaines.net> <87wnsziing.fsf@cbaines.net> <87mttuhyoq.fsf@cbaines.net> <878s5ahzke.fsf@cbaines.net> <87sg3hgq1r.fsf@cbaines.net> User-agent: mu4e 1.4.15; emacs 27.1 From: Christopher Baines To: Canan Talayhan Subject: Re: [Outreachy] - Guix Data Service - Set a more informative page title In-reply-to: <87sg3hgq1r.fsf@cbaines.net> Date: Sat, 24 Apr 2021 12:39:34 +0100 Message-ID: <87zgxngbd5.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619264399; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=BaFpcKTyvefjAXcbtF8IC3I03Ww3FeN23tutDNxLyC8=; b=DYhSC44uMEX10sA5d93u17FmMcTITYfQtFm8kHoG7hXhaytdUFEOAMxaPLkjnx25U/NFF1 RE6nJyOcQfR2PDvmD8Y/D8HOPyAoh/IyV4N9/C76HX7wMfoMaSb8WXu8SoTvL9XN+h0b6P T4k+XFoV7BB0D3qJNY9ppOZXgZp9OxJ1XPEjOUn/R5lACQ+C6IetRLKCUMihhzhMkUbAf7 Cz3Lv+MPa11QYukaRNksOFYO7RvfQy1doph/46ifrNVQWqHqiTPze2vyVD/Cj7cuLNZGpR lfIVJiOnApmiiUuM4G4w2V0q1WabEBCwXCt/D6YcTzoN5rxZKsnsZxTVw/Zjfg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619264399; a=rsa-sha256; cv=none; b=TTmj0kZjXWTPkeCZ/eRsnODyooKq0X8WS1mHEtjYH1aXyRoW+JuZyDCCA4XPryfp8ZNG85 2YLIRrO9T37zswOnPftTSkOCi0cFvNp/fgiMmQL812BpwbY4PA4Fwbqix9IWgdHuz62hMT rxhA8gz2pNPFwNkPy4JPQwAxlrMZY3S91VrER83DD7bkOKpMLrmwf9QriEa3/LEm0/393I T8Fwy0CtXdG3SrgpDB/eXkXq9nwGxFgXClroEfL6JwEAL9rXN2rbaEQ/ai8cVeU4/FiMzG UO49iSfifw1tKyqh16vsjxh/7sZmwze0E3u49K0QKe3NJClleql2lraI+eGrWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -4.54 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: B239D2937F X-Spam-Score: -4.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: Nmr6ZFsevteV --=-=-= Content-Type: text/plain Christopher Baines writes: > The approach I'd recommend is, make yourself a realistic > temp_package_metadata table by populating it with all the > package_metadata entries for a single revision already in your local > database. Then construct and try the slow query, and see how long it > takes, and look at the query plan (run the query with EXPLAIN at the > start). Following up on your question on IRC about creating the temporary table, the code that does this is here [1]. I wouldn't suggest running the code, just the same SQL it uses, and use relevant values for temp-table-name and table-name that are appropriate for the package_metadata table. 1: https://git.savannah.gnu.org/cgit/guix/data-service.git/tree/guix-data-service/model/utils.scm#n313 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmCEA3ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XckaQ//bG3xDR0q7z1rciych8iMtrUKgqooNQWl VuyaL2RcOefnCOlpji/NTkzenOihey5kDLA4eZnex7e7V70/cqIOaaCt3ruDQlLp S6r+kQIHkijHrJcOQNniD1RfYvEYicdoB21Mv4B9qCQtzVe2Tqoj4Y0bded5YjuJ izhm6MErMKQToL4EIliFRw6GR7pirPrGx5/cOoETg77LfCb901PKHnup/RNeW2i8 WGfT+BkrfSsJnymEkOJK5BB04fWXCaqSAuLIsKMTbqB+hXfMg1sB98vNQY21/0a7 4Bi1vbO61VrUUDgO4wHJNsCQUCIDoSkUGeCSsbDKdtSjKGOYIfVhvOTL2V4PWE3G faUsc/6+E0IRG0NV9ZM10Xft1Rh3V/VKkgP5p6FgzJclpF/66ea3zPPd+tCwHx1/ L2+h8ZQijn4zz8c1lz1Wcgk3Z+U/8wb/d9ycoLz1Z97SDHiByi9Ur7cUKIu7Aqnm 31Co3n13gBDX+15haVj08WehkQ2/e+BAmimPWz3VvZN8KjCLS+pQvjn7ebF6MkCp jKaJvcwOyfuHAt3oXHB6JeSHFnJPqGjEX9ojbhARpPb9mvVHk6lZRUj2oie+rWt+ M0a3S3tdz1yusaAeCisfmDlI9vJv78QFyYpRYesBQvz2XG/0wT8vVOY0aaq9USA4 dHLr2jH7Wj4= =7WY2 -----END PGP SIGNATURE----- --=-=-=--