guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Outreachy] - Guix Data Service - Set a more informative page title


From: Canan Talayhan
Subject: Re: [Outreachy] - Guix Data Service - Set a more informative page title
Date: Sat, 24 Apr 2021 18:30:09 +0300

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.

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.

Am I still on the right track?


On Sat, Apr 24, 2021 at 2:39 PM Christopher Baines <mail@cbaines.net> wrote:
>
>
> Christopher Baines <mail@cbaines.net> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]