I have two databases D1 and D2. I have created a synonym T1 in D2 which refer to a table T1 from the D1 database.
Now if I query using the T1
synonym in the D2
table, will it use the index of the T1
table from the D1
database?
Currently, I am in a situation where my tempdb is growing, and I found that it is because of the query on the synonym, I can't view the query plan from the D2 database as SHOWPLAN permission is denied in the D1 database, however, if I run the same query on the D1 database, it goes well, and use a proper index.
Or is there a way to create a synonym with indexes?