Some queries never finish executing using SQL Server

I'm using DataGrip 2017.2.2 on Windows 7 x64. I'm connecting to a SQL Server 2012 database server via Windows authentication. Some queries I run never finish executing. I will get the spinning/loading icon on the Results pane, and it will just sit there until I manually cancel the query. If I copy/paste the query and execute it in SQL Server Mgmt Studio, it will execute the query in half a second. I can execute some queries without any issues, but some queries (regardless of length and/or complexity) just never finish executing.

What made me end up posting this is I was running a query and searching for customers by last name. I changed the parameter for LIKE to a different last name, and the query just would never finish executing. HOWEVER, when I changed the last name back to the previous one, it executed just fine.

Any ideas why this would be happening? Thanks.

1 comment
Comment actions Permalink


Could you provide any IDE logs? Could you provide sample DDL and data to reproduce the problem?

Thank you.



Please sign in to leave a comment.