Open jwntrs opened 5 years ago
version_md5
is used so that the tables that reference resource versions only need to care about if the specific version (hash) exists instead of caring about concourse's "resource versioning" where versions can be gced from the database and brought back under different version_id
s even though they are the exact same versions.
I created another issue (#3460) for investigating the performance differences with using various column types for the version references.
If versions are unique and we create foreign key references to map them to scopes/spaces then we would never have to delete the version itself. We would only need to remove the mapping. This means that we would have persistent version_ids that we can use elsewhere.
What challenge are you facing?
We reference the
version_md5
in a bunch of places, and it seems to really slow down our queries.What would make this better?
Can we use the
version_id
instead? At the very least we should probably indexversion_md5
.