Monday, February 8, 2016

SQL Server 2016 Query Store - export & import?

Looking around for a good way to export and import query store from SQL Server 2016.
 
I'm performing large scale comparisons of the legacy cardinality estimator and the new cardinality estimator in SQL Server 2016.
 
I've captured over 9000 queries in two flavors.  First execution was SQL Server 2016 compatibility mode with trace flag 9481 (to force use of legacy cardinality estimator) & trace flag 4134 (I'll retire as soon as its confirmed the wrong results issue is corrected by default).  The second execution was with no trace flags enabled.
 
 
The database will soon be replaced with another test bed - approximately 1 TB larger.  I'd love to be able to compare behavior against the existing database to behavior on the larger database.
 
If all else fails, I'll set all user index & column stats to norecompute then truncate all user tables.  Then shrink the database and smush it into a single file.  That would preserve all the info I am interested in - and I could compare stats & query store across the smushed database and the new test bed.
 
Although I could export information from each of the query store catalog views, I suspect there might be information in the query store that isn't exposed through the catalog views.  Plus I'd rather not handle over 19,000 XML plans :-)
 
So I'm kinda hoping there is a clever export/import possibility... 
 

Thursday, December 3, 2015

CDC Data, 2001 to 2011




Year
Firearm
Motor Vehicle Traffic
Poisoning
Page
29,573
42,443
22,242
71
30,242
44,065
26,435
77
30,136
43,340
28,700
78
29,569
43,432
30,308
77
30,694
43,667
32,691
78
30,896
43,664
37,286
89
31,224
42,031
40,059
89
31,593
37,985
41,080
91
31,347
34,485
41,592
81
31,672
33,687
42,917
83
32,351
33,783
46,047
84