I have two tables Sites and ScannedItems. Sites has around 15000 rows, and ScannedItems around 60 millions rows. Below query takes around 6 minutes with indexes on CountUniq