Skip to content

Document database queries required for HTTP API

Context

This is a followup from gitlab-com/www-gitlab-com!60918 (merged), where the Database and Package teams discussed possible improvements for the Container Registry database schema, to allow for partitioning and increase the efficiency of garbage collection queries.

Related to #206 (closed) and #104 (closed).

Purpose

This MR documents the database queries required to serve the registry HTTP API requests, considering the schema improvements/changes proposed in gitlab-com/www-gitlab-com!60918 (merged).

This is intended to serve as medium for discussion/review of the database queries and their execution plans, as well as for persisting information for future reference.

Notes

The query plans attached to each query were extracted from a database created with alternative_model.sql and filled with sample data from script sample-dump.sql. Given the (tiny) size of the database, the performance indicators from these query plans are not significant, but at the moment we're mostly concerned with functionality, indexes and partitioning.

Edited by João Pereira

Merge request reports

Loading