Blog Post

SQL Server Blog
1 MIN READ

How to create fake statistics for testing query plans

SQL-Server-Team's avatar
Mar 23, 2019
First published on MSDN on Mar 12, 2007

This is very cool - an undocumented option to UPDATE STATISTICS that allows you to fool the server into thinking a table has more rows or pages than it actually has - very useful for testing. See this blog post on the old Query Optimizer team blog. Thanks to Tony Rogerson for pointing it out.


Updated Mar 23, 2019
Version 2.0
No CommentsBe the first to comment