We have been using several nested queries for reporting purposes since the days of SQL Server 2000.
select * from
(select * from t1) t1
inner join
(select * from t2) t2
on........
We recently upgraded our database to SQL Server 2008 Standard from SQL Server 2000 Enterprise. We are noticing some of those old queries are now running very slow or even timing out. Size of database has really not changed a lot.
We fixed above problem by replacing some of the nested queries with temporary tables.
However, we are still not sure that nested were working slow now temp table are working better. We have not made any change join or where clause.
Any insight or thoughts will be helpful.