Issue #1649398 by hclaria, mikran, Uhkis: Fixed performance issues by adding separate indexes to endpoints table.