How to get the information of the optimizer of sql server?
You should check out the SQL Management Studio

It will let you see many things about your query. I know it will show you the cost of executing the query. It will also show you the cost of each step of the execution. 

http://msdn.microsoft.com/en-us/library/ms178071(v=sql.105).aspx

http://msdn.microsoft.com/en-us/library/ms191194(v=sql.105).aspx