Running queries with simulated statistics

Use set statistics simulate on to optimize queries using simulated statistics:

set statistics simulate on

In most cases, you also want to use set showplan on.

If you have loaded simulated statistics into a production database, use set noexec on when you run queries using simulated statistics so that the query does not execute based on statistics that do not match the actual tables and indexes. This lets you examine the output of showplan without affecting the performance of the production system.