TMDM-7435: "Improve performances while logging into the application"

Adds automatic index on task id to increase match statistics query execution (staging only).