Report Caching and Report snapshot in SSRS

Caching and Snapshot of the report:
Caching is a copy of the last executed report. It is not a persisted copy; it has a lifetime (like caching for 30 minutes). It is stored on the ReportServerTempDB database. You can have only one "instance" per report (if you have parameters, you will have one per combination of parameter)

Snapshot is a persisted copy of the report. It is stored for good on the report database. You can have as many as you want. You can configure for example to save a snapshot of a report per day, so if you want to see how was your data 3 months ago, you just access the snapshot of that day.
Caching in detail: SSRS lets you enable caching for the report, in which case SSRS will maintain (store in ReportServerTempDB database) a copy of the processed report (along with data) in intermediate format so that if the same report request comes again, the stored copy can be rendered in the desired format and served. This improvement in subsequent report processing can be evident especially in cases where the report is quite large and accessed frequently.

Please note, different combinations of parameters force SSRS to store a new cache and require more storage space for ReportServerTempDB database. Also the reports served from cache will consistently show the same data (even if the data has changed since the last query) until the cache is refreshed. A cached report can be set to expire after a specified time interval or after a specific date and time. After expiration, a cached report is replaced with a newer version when the user selects the report again.

Caching for a report can be enabled only if the report uses the data sources with stored credentials; in other words caching cannot be enabled for a report if it prompts users for credentials or uses Windows Integrated authentication.

Snapshot in details: A report snapshot is a report that contains layout information and data that is retrieved at a specific point in time. A report snapshot is usually created and refreshed on a schedule, allowing you to time exactly when report and data processing will occur. If a report is based on queries that take a long time to run, or on queries that use data from a data source that you prefer no one access during certain hours, you should run the report as a snapshot. A report snapshot is stored in the intermediary form in the ReportServer database, where it is subsequently retrieved when a user or subscription requests the report. When a report snapshot is updated, it is overwritten with a new instance. The report server does not save previous versions of a report snapshot unless you specifically set options to add it to report history. We cannot create a snapshot for a report that prompts users for credentials or uses Windows integrated security to get data for the report.

If you have any thoughts or suggestion, feel free to post in the below comment section.


No comments:

Post a Comment