I am working on a report query generated by COGNOS. This report when run sumetimes bloats the tempdb to 100+GB filling the disk space, this is on a read-only logshipped database. The query takes almost 30 minutes to finish (no wonder the tempdb bloats :), but the total reads is about 6 million!
I tweaked on of the views and the report now runs in less that 3 minutes, tempdb size remains the same, but seeing huge amount of reads (703253335) ie almost 5000+ GB . The server has just 4 Gb of memory, so the question, is sql reading the same pages again and again ? So, the query now performs much better, no issue with tempdb but the reads are very high!
Looking for some explanation for this behavior!
Thanks,
Ranga