cost model calculation: filtering queries