all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Canan Talayhan <canan.t.talayhan@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [Outreachy] - Guix Data Service - Set a more informative page title
Date: Sat, 24 Apr 2021 21:21:43 +0100	[thread overview]
Message-ID: <87wnsrfn6w.fsf@cbaines.net> (raw)
In-Reply-To: <CAAosC5K=SU4u31Sy2hj1apDp+7xgnQp-97pMO2Kxs3zAPGD=bA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2682 bytes --]


Canan Talayhan <canan.t.talayhan@gmail.com> writes:

> Thanks for your quick response. It helps a lot to me. But still, I
> have some confusion about the reproduction steps. As I understand it,
> I can reproduce the slow query just using the pure SQL queries without
> touching the code for now, right?
>
> Please find my steps below:
>
> 1. CREATE TEMPORARY TABLE temp_package_metadata (LIKE package_metadata
> INCLUDING ALL)
>
> As we expected, it creates a table but has no data. So I want to
> insert some data but colon types are integer and I don't know any
> meaningful data for these colons.

So, the question to ask here is what data would the temporary table
usually contain during loading data for a revision (when the slow query
happens). I gave more specific information about the data in the
temporary table in my previous email.

> 2. CREATE TEMPORARY TABLE temp_package_metadata AS TABLE package_metadata
>
> Then I create a copy of the package_metadata.
>
> 3. EXPLAIN ANALYZE SELECT * FROM temp_package_metadata
> This code generates 155 msec execution time, but I think it should
> take more time.

I don't see why that query should be slower, but that's also not that
relevant since I think the actual slow query in question here is quite
different.

You can find the query in the code by looking at where it does the
timing for "querying the temp_package_metadata".

I've also got information from the PostgreSQL logs, which gives this as
the query:

  SELECT package_metadata.id, package_metadata.home_page, package_metadata.location_id, package_metadata.license_set_id, package_metadata.package_description_set_id, package_metadata.package_synopsis_set_id FROM package_metadata INNER JOIN temp_package_metadata ON (package_metadata.home_page = temp_package_metadata.home_page OR (package_metadata.home_page IS NULL AND temp_package_metadata.home_page IS NULL)) AND (package_metadata.location_id = temp_package_metadata.location_id OR (package_metadata.location_id IS NULL AND temp_package_metadata.location_id IS NULL)) AND (package_metadata.license_set_id = temp_package_metadata.license_set_id OR (package_metadata.license_set_id IS NULL AND temp_package_metadata.license_set_id IS NULL)) AND (package_metadata.package_description_set_id = temp_package_metadata.package_description_set_id OR (package_metadata.package_description_set_id IS NULL AND temp_package_metadata.package_description_set_id IS NULL)) AND (package_metadata.package_synopsis_set_id = temp_package_metadata.package_synopsis_set_id OR (package_metadata.package_synopsis_set_id IS NULL AND temp_package_metadata.package_synopsis_set_id IS NULL))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

      reply	other threads:[~2021-04-24 20:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13  9:01 [Outreachy] - Guix Data Service - Set a more informative page title Canan Talayhan
2021-04-13 11:57 ` Maxime Devos
2021-04-13 15:56   ` Canan Talayhan
2021-04-13 17:51     ` Maxime Devos
2021-04-15 12:08       ` Canan Talayhan
2021-04-15 21:52         ` Christopher Baines
2021-04-16  9:58           ` Canan Talayhan
2021-04-16 11:11             ` Christopher Baines
2021-04-18 13:42               ` Canan Talayhan
2021-04-18 17:53                 ` Christopher Baines
2021-04-18 20:37                   ` Canan Talayhan
2021-04-19 19:16                     ` Christopher Baines
2021-04-21 15:43                       ` Canan Talayhan
2021-04-22 19:46                         ` Christopher Baines
2021-04-23  8:34                           ` Canan Talayhan
2021-04-23 12:10                             ` Christopher Baines
2021-04-24 11:39                               ` Christopher Baines
2021-04-24 15:30                                 ` Canan Talayhan
2021-04-24 20:21                                   ` Christopher Baines [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnsrfn6w.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=canan.t.talayhan@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.