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...