I have a view definition as follows...
I have databases Database1 and Database2. The table H is on Database2 and all other tables in Database1.
select A.Id,B.ID,C.ID,D.ID,E.ID,F.Id,G.Id,H.HistoryId FROM Database1.A A inner join Database1.B on A.Id=B.Id inner join Database1.C on B.Id=C.Id inner join Database1.D on C.Id=D.Id inner join Database1.E on D.Id=E.Id inner join Database1.F on E.Id=F.Id inner join Database1.G on F.Id=G.Id Inner Join (select distinct HistoryId from Database2.History)H on G.HistoryId=H.HistoryId
History(Id,HistoryId)
As you see in the above query I am joining H table on HistoryId, in H table is having clustered index is on Id column and no index on HistoryId. while accessing this view I am seeing performance issue w.r.to H table which is on Database2.
Even execution plan is suggesting to create a non clustered index on H(HistoryId). The problem here is that I don't have permission to modify the objects in Database2. So my question is without modifying History table structure how can I improve the views performance?