I have a script that uses aggregate functions many times, and that might cause the slowdown of my script. And I thought to simplify my script and do all the summation/addition/concatenation on the SSRS side. is it okay? What do you prefer? TIA. Happy coding! :)


I don't think there's a general best option in this matter. It depends on many things;

For instance, if you are dealing with high activity on the database, or even have memory issues (not you, but the database jk) you might want to grab the data and leave asap, that means, move most of the computations on SSRS;

Leave the simple aggregations (like totals, avgs etc) to the SSRS, because it is already optimised to do such tasks on Tablix. If you have more complex aggregations (eg. partitions) let the SQL server do them. If the database and SSRS are on different machines, watch the activity (load), and based on that do the judgement.

These are all performance issues, but there is also flexibility to be taken into account. Try to be proactive, and find the elements prone to modifications, and see where it would be easier to apply them (on the SQL, or the report).

The idea is that it really depends on each individual report that you are trying to develop. My advise would be to do the computations on SQL, because it is easier.

Lastly, as a rule of thumb, do not try to optimise something that is not having any performance issues. Most of the times the improvement rate it just not worth the time invested. When your server starts to look tired, check the most expensive queries, and if this one is in top, then you might consider moving some of the computations on SSRS.

Hope my advice is useful to you. Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.