aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/guix-revision-package-derivation.scm
Commit message (Collapse)AuthorAge
* Use system-ids for inserting distribution countsChristopher Baines2024-08-12
|
* Add more logging to backfilling ↵Christopher Baines2024-08-12
| | | | guix_revision_package_derivation_distribution_counts
* Parallelise inserting package derivation distribution countsChristopher Baines2024-08-10
|
* Move backfilling in to the server module and use the connection poolChristopher Baines2024-04-01
| | | | To avoid using the old PostgreSQL connection per thread code.
* Fix query in get-count-for-next-levelChristopher Baines2023-03-09
|
* Store the distribution of derivations related to packagesChristopher Baines2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This might be generally useful, but I've been looking at it as it offers a way to try and improve query performance when you want to select all the derivations related to the packages for a revision. The data looks like this (for a specified system and target): ┌───────┬───────┐ │ level │ count │ ├───────┼───────┤ │ 15 │ 2 │ │ 14 │ 3 │ │ 13 │ 3 │ │ 12 │ 3 │ │ 11 │ 14 │ │ 10 │ 25 │ │ 9 │ 44 │ │ 8 │ 91 │ │ 7 │ 1084 │ │ 6 │ 311 │ │ 5 │ 432 │ │ 4 │ 515 │ │ 3 │ 548 │ │ 2 │ 2201 │ │ 1 │ 21162 │ │ 0 │ 22310 │ └───────┴───────┘ Level 0 reflects the number of packages. Level 1 is similar as you have all the derivations for the package origins. The remaining levels contain less packages since it's mostly just derivations involved in bootstrapping. When using a recursive CTE to collect all the derivations, PostgreSQL assumes that the each derivation has the same number of inputs, and this leads to a large overestimation of the number of derivations per a revision. This in turn can lead to PostgreSQL picking a slower way of running the query. When it's known how many new derivations you should see at each level, it's possible to inform PostgreSQL this by using LIMIT's at various points in the query. This reassures the query planner that it's not going to be handling lots of rows and helps it make better decisions about how to execute the query.
* Add copyright and license headers to a bunch of source filesChristopher Baines2019-12-26
| | | | That were missing them.
* Many changesChristopher Baines2019-03-11
A large proportion of these changes relate to changing the way packages relate to derivations. Previously, a package at a given revision had a single derivation. This was OK, but didn't account for multiple architectures. Therefore, these changes mean that a package has multiple derivations, depending on the system of the derivation, and the target system. There are multiple changes, small and large to the web interface as well. More pages link to each other, and the visual display has been improved somewhat.