How to decide to aggregate data in SQL Server or in Report Server

  • Hello:

    In my database, I have two columns that show a start time and end time. Ultimately I want to show the start time, stop time, and duration (start - stop) in my report. So do I add another column in my view on the db side, or do I do the math on the reporting services side.

    I would think that the less data I 'generate' the better, but wasn't sure if the db is more efficeint at crunching numbers than the RptServer, thus outweighing the transfer of extra data.

    Note: The database and the Report Services (and IIS) are all on the same computer.

    Thank you.

  • There's really only one way to know for sure... try both with Profiler running. Select the one that uses the fewest resources for CPU and Reads. Both should be very fast, though. The deciding factor will be the number of resources used on the server, though.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply