In Microsoft SQL Server, is it possible to find how much time the query optimizer spent to generate N numbers of execution plans? (Let's say for a specific stored procedure).
Also, is it possible to know how many execution plans the query optimizer generated and which execution plan it has selected for that specific stored procedure?
Or does the query optimizer completely works like a sealed box?
Thanks!