Too Long; Didn't Read
Spacelift is a CI/CD platform specializing in [Infrastructure as Code]. Users create Runs (executions of, i.e., Terraform) which will be executed on Worker Pools. The query is supposed to notify us when the public Worker Pool cannot handle demand – user Runs are waiting too long to be handled by a Worker Pool. We couldn’t move these queries to Redshift because of the staleness of the data there. We had to optimize, add indices, optimize, and again optimize until we cut the database usage of these metric-creating queries by 1-2 orders of magnitude.