DNN-5263: added index to speed-up the query.