Temporary Statistics Objects in SQL Server 2012
Statistics are maintained by SQL Server to estimate cardinality of T-SQL queries which helps in the generation of execution plans. Statistics are metrics that are used by SQL Server to identifying the best approach to execute a particular query and it is created for each table based on the column data types.
Whenever the data in a particular table changes, the statistics are automatically updated by SQL Server using the AUTO UPDATE STATISTICS (this can be done manually as well). The problem occurs with read-only databases or database snapshots where no more changes happen and the statistics cannot be updated. This could be an issue since these types of databases are mainly used for analytics purposes and different types of queries will have to be executed at any point. In this case, using the existing statistics may not work and calls for creation of new statistics objects. This is the default behavior in SQL Server 2008 and prior versions and will cause performance bottlenecks.
In SQL Server 2012, a new feature called Temporary Statistics Objects has been introduced to address specifically this type of issue. Using this feature, SQL Server can create statistics for tables in read-only databases or snapshots and these statistics will be saved in the tempdb database. This feature can also be used in the active secondaries while implementing the AlwaysOn feature in SQL Server 2012.
More details on this feature can be found here.


