摘要:
当我们想要分析某些语句在一定数据量后的执行计划情况是可能会进行数据的模拟,伪造大量的数据。但其实这个工作挺费劲了,经朋友介绍在网上看到下面这种伪造统计信息的方式,对于如果只是分析执行计划的情况很方便。use tempdbgocreate table t1(i int, j int)gocreate table t2(h int, k int)goset statistics profile ongoselect distinct(i) from t1goselect * from t1, t2 where i = k order by j + kgoupdate statistics t1 w 阅读全文