Added indices and optimized several query`s. Huge speed improvement with 5000+ episodes