• Vladimir Shushlin's avatar
    Speed up searching environments by ref deployed · 3dac2744
    Vladimir Shushlin authored
    Current query looks over all project deployments
    and aggregates by environment_id
    
    New query loops over project's environments and
    tries to find existing deployment for it
    
    We also add a dedicated index on
    [environment_id, ref] to speed up this new query.
    
    Changelog: added
    3dac2744
environments_by_deployments_finder.rb 2.12 KB