Deepthi Goguri provides an intro to Query Store:
Introduced in SQL Server 2016, the Query Store feature will store the Query plans, Queries, resource consumption information along with the run time stats information for your queries. This feature is not automatically enabled on your databases. It is a database-level option only. You need to enable the Query Store on the database to capture the queries and query information. You cannot enable the Query store on master or tempdb databases. The information captured by the Query Store is stored in the database you enabled the feature on, in the internal tables created in the PRIMARY filegroup and this cannot be changed. (Microsoft docs reference).
One thing I would mention that Deepthi didn’t cover is, if you tried out Query Store a while ago and ran into problems, try again on the latest CUs of SQL Server. There have been a lot of bugfixes and optimizations which have made it a much more useful product.
“which have made it a much more useful product.”
Care to Share?
Most of the improvements were around stability: fixing some early bugs in how plans were collected, making the garbage collection process a lot less resource-intensive, and making data collection more efficient. Those changes have been spread out over CUs from about 6 months in for SQL Server 2016 to some of the more recent CUs in 2019.
Erin Stellato has kept track of many of the most important ones:
https://www.sqlskills.com/blogs/erin/query-store-fix-in-sql-server-2017/
https://www.sqlskills.com/blogs/erin/important-query-store-fixes-january-2019/
https://www.sqlskills.com/blogs/erin/important-query-store-fixes-summer-2019/
thanks!!