Upgrade process extremely slow because of very big PROJECT_MEASURES table (85 million rows)

Hello,

just for the record:

  • Today I migrated SQ 5.6.6 to SQ 6.7.6 (PostgresSQL 10)
  • Sizes after migration:
      relation      | total_size 
--------------------+------------
 project_measures   | 19 GB
 projects           | 834 MB
 duplications_index | 782 MB
 file_sources       | 640 MB
 snapshots          | 253 MB
 issues             | 99 MB
 ce_activity        | 69 MB
 issue_changes      | 62 MB
 events             | 45 MB
 rules              | 12 MB

project_measures contains ~ 32M rows

  • I did this once on my Macbook Pro (small one with i5) (both PostgreSQL 10 and SQ running in Docker containers), this took about 50 minutes.
  • Doing the same between took 2 KVMs took 4h54m.

Regards
Mirko

1 Like