As we collect more data, we started to have some slow queries. This PR addresses this issue:
Creates indexes for build_identifier, target_identifier and step_identifier.
Optimises the query that fetches the list of Target that belong to a build by using the full table name partition.
These changes resulted in the v1/build/info endpoint to return data in less than a second in our internal installation, before the changes it was taking 60 secs.
Additionally, adds an endpoint to fetch the list of Step that belong to a Target, that uses the same technique of using an index plus the full table name for the query. Before doing this change it was almost impossible to make a query to our Step table, because it was taken like 10 mins.
As we collect more data, we started to have some slow queries. This PR addresses this issue:
build_identifier
,target_identifier
andstep_identifier
.Target
that belong to a build by using the full table name partition.These changes resulted in the
v1/build/info
endpoint to return data in less than a second in our internal installation, before the changes it was taking 60 secs.Additionally, adds an endpoint to fetch the list of
Step
that belong to aTarget
, that uses the same technique of using an index plus the full table name for the query. Before doing this change it was almost impossible to make a query to ourStep
table, because it was taken like 10 mins.