MICA-872: Better query that checks for dataset harmonization (LIMIT 1 instead of selecting all rows and doing a rowCount).