Ok So I troubleshooted into more. Found out the problem was my query in SQL Server Management Studio (SSMS) not Stimulsoft. My query was running under 2 sec in SSMS. It was probably getting some cache data may be. The next day when I came and opened a new instance of SSMS, my query was not running in 30 second. In fact I left it running and it took 42 minutes to complete!
Since then I have added indexes. The problem was a subquery which had big data. So I put that data into #temp table and applied index that significantly reduced the time of the query + did some other improvement.
I still have a problem. Now when the query run, it wait and wait and then returns a blank page. Inside designer the query does return results in 12 sec which is correct according to SSMS. So there are still issues to be resolved!
