This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/data/migrations
Joseph Schorr f4a1646a8b Add an index on the logs_archived boolean on a RepositoryBuild
Addresses the slow query:

```
SELECT `candidates` . `id` FROM ( SELECT `t1` . `id` FROM `repositorybuild` AS `t1` WHERE ( ( ( `t1` . `phase` IN (...) ) OR ( `t1` . `started` < ? ) ) AND ( `t1` . `logs_archived` = ? ) ) LIMIT ? ) AS `candidates` ORDER BY `Rand` ( ) LIMIT ? OFFSET ?
```

While the cardinality on `logs_archived` will be low, it should also only be in the `false` state for a very small number of records, so it should make this query very, very fast.
2019-02-15 16:11:25 -05:00
..
versions Add an index on the logs_archived boolean on a RepositoryBuild 2019-02-15 16:11:25 -05:00
__init__.py Add support for populating test data during migration testing 2018-06-18 14:14:32 -04:00
env.py Fix error case in uploading tar, more comments 2018-06-22 13:23:08 -04:00
migration.sh Phase 1 of migrating APPR-specific tables to tables with the Appr prefix 2018-07-20 13:19:01 -04:00
script.py.mako Add support for populating test data during migration testing 2018-06-18 14:14:32 -04:00
tester.py Add support for populating test data during migration testing 2018-06-18 14:14:32 -04:00