So I have a query that's basically SELECT column FROM DB1.Schema.View. The view is a bit of a mess, does some crazy unions on other tables, etc, but... it works, and has a cost of 300.
However, if I execute it in the context of a database that's not the one I'm selecting from, IE, the dropdown at the top left of SSMS has DB2 selected, the cost jumps up to like 3billion, and it never finshes. It's spending most of it's cost on a tempDB sort.
Further more, running it in the context of DB3 or DB4 also works fine. It just doesn't like DB2, and I'm not sure why.