Optimize SQL requests of watch page API endpoints