Query Optimizer unable to create execution plan

Copper Contributor

I have a very strange thing happening on my SQL Server 2019 Enterprise edition.

My database is rather small ( 120 Gig ) and is used by a 3rd party application, so something I can't change.

The application runs reports against that database and recently some of the reports stopped working ( maybe due to data growth ? ).

Upon further investigation I found that the query would be sent to the server, but it would run forever and no execution plan was created. In the activity monitor I see the query, but with the command "show execution plan" I get this message:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve Execution Plan data.

------------------------------

No error message in the SQL logs or any indication why the query optimizer is not able to even create a plan.

Is there any option to identify the culprit ?

2 Replies

Same for me. But every so often it works. (mostly doesn't)  Also finding that Sql Server 19 then 22 inconsistent speed of searches, I've done one fresh install, inconsistent with both SSMS and when connecting remotely using ODBC.

 

Hello,
I'll strongly suggest you to make sure that you have the statistics updated. this is extremely important for the sql engine to come up with right execution plans.
Also will be interesting to know if this 3rd party apps relies on Stored procedures or Ad Hoc queries

Regards
Javier