Performance upgrade on Intelligent Assignment using Indexes and batch queries