add index to deviceid