An index on BinaryPackageBuild(source_package_release, distro_arch_series) would improve this a little, but there's no really efficient way today to do what the query wants: get the latest build for a particular (SPN, DAS).
An index on BinaryPackageBu ild(source_ package_ release, distro_arch_series) would improve this a little, but there's no really efficient way today to do what the query wants: get the latest build for a particular (SPN, DAS).