Troubleshoot slow running query in SQL Server (Lack of execution memory case)