Fix #6: Introduce detect contentions query