Skip to content

Prune package events data

The packages_events table is growing at a considerable pace having reached a few million entries in gitlab.com since its introduction.

We're gonna need to prune and/or partition the data.

count_all | packages_events_event_type
-----------+----------------------------
     58849 |                          0
    475627 |                          2
      6505 |                          3
   2569495 |                          4
   2270597 |                          5
      3983 |                          6
     12287 |                          7
      9852 |                          8
   5296629 |                          9
     17918 |                         10
> SELECT COUNT(*) FROM "packages_events";
  count  
---------
 8245716
(1 row)

Ref #205578 (closed)