fe76a2562e
The existing query was inefficient using an index scan and index merges. This change splits the query up into many individually much more efficient queries. This should significantly improve performance on large sites.