Why would SQL 2017 never generate an execution plan for a query? The query is against a view. If I run the query that defines the view, it completes in under a minute. If I query the view it never completes and I observe the following...
dm_exec_requests shows no plan handle
sp_whoiactive shows no plan handle or execution plan
If I try to watch live plan execution all I get is a message that says "Waiting for execution plan".
The session's logical reads is not increasing but CPU usage is.
Is this a bug? If so I've not been able to find it online.
Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)