Optimize session relation