exam questions

Exam DP-300 All Questions

View all questions & answers for the DP-300 exam

Exam DP-300 topic 3 question 1 discussion

Actual exam question from Microsoft's DP-300
Question #: 1
Topic #: 3
[All DP-300 Questions]

You have an Azure SQL database named sqldb1.
You need to minimize the possibility of Query Store transitioning to a read-only state.
What should you do?

  • A. Double the value of Data Flush interval
  • B. Decrease by half the value of Data Flush Interval
  • C. Double the value of Statistics Collection Interval
  • D. Decrease by half the value of Statistics Collection interval
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
miguelmol
Highly Voted 3 years, 7 months ago
From my point of view, the correct answer is C. (Double the value of Statistics Collection Interval). To avoid Query Store transitioning to read-only state, the runtime statistics for the Last Stale Query Threshold days must fit in the defined Max Size (MB). If the Statistics Collection Interval is increased then less space will be used for the persisted runtime statistics and there will be more free space for new data. The Data Flush Interval can delay the transitioning to read-only state, but not minimize the possibility it occurs.
upvoted 33 times
voodoo_sh
2 months ago
Disagree. It seems logical that doubling Statistics Collection Interval will make Query Store consume less storage. BUT - when you try to run this: ALTER DATABASE [DB1] SET QUERY_STORE (INTERVAL_LENGTH_MINUTES = 120) GO It fails with error: Msg 153, Level 16, State 6, Line 1 Invalid usage of the option interval_length_minutes in the ALTER DATABASE statement. The GUI doesn't have selection of 2 hours, too. You can only set it to 30 minutes (or less), or to 1 day 1440 minutes. So C is not the right answer.
upvoted 1 times
...
Luke97
3 years, 4 months ago
Agree. This should be the correct answer. I don't see how DFI make any influence to Max Size.
upvoted 3 times
Raffer
3 years, 1 month ago
You're right - the only sensible answer is "C".
upvoted 1 times
...
...
...
matongax
Highly Voted 2 years, 6 months ago
in microsoft prep test ,this question says B. Decrease Data Flush Interval.
upvoted 11 times
KingChuang
1 year, 3 months ago
B is correct. While Query Store collects queries, execution plans, and statistics, its size in the database grows until this limit is reached. When that happens, Query Store automatically changes the operation mode to READ_ONLY and stops collecting new data, which means that your performance analysis is no longer accurate. MAX_STORAGE_SIZE_MB limit isn't strictly enforced. Storage size is checked only when Query Store writes data to disk. This interval is set by the DATA_FLUSH_INTERVAL_SECONDS option or the Management Studio Query Store dialog option Data Flush Interval. https://learn.microsoft.com/en-us/sql/relational-databases/performance/manage-the-query-store?view=sql-server-ver16&tabs=ssms
upvoted 1 times
...
...
voodoo_sh
Most Recent 2 months ago
Selected Answer: B
B: Decrease by half the value of Data Flush interval --> to prevent in-memory max size. While Statistics Collection Interval has direct impact on Query Store size storage wise, you can't double the Statistics collection interval. GUI doesn't allow that, and setting INTERVAL_LENGTH_MINUTES to 120 in T-SQL also fails.
upvoted 1 times
...
k6745
5 months, 1 week ago
Selected Answer: B
B is right answer
upvoted 1 times
...
ofzrgrz
7 months, 3 weeks ago
It's B. Decreasing Data Flush is the main way to keep the Query Store outside of read-only, prevent in-memory max size, and when it writes to disk, can delete stale data if enabled. Data Flush can be halved/doubled with ease. Statistics Collection Interval cannot be doubled as easily.
upvoted 3 times
...
jtu363
1 year, 3 months ago
Selected Answer: C
C is correct
upvoted 2 times
jtu363
1 year, 3 months ago
Please disregard comment
upvoted 2 times
...
...
vittOS
1 year, 4 months ago
Selected Answer: B
https://learn.microsoft.com/en-us/sql/relational-databases/performance/manage-the-query-store?view=sql-server-ver16&tabs=ssms Stale Query Threshold (Days): Time-based cleanup policy that controls the retention period of persisted runtime statistics and inactive queries, expressed in days. By default, Query Store is configured to keep the data for 30 days, which might be unnecessarily long for your scenario. Avoid keeping historical data that you don't plan to use. This practice reduces changes to read-only status. The size of Query Store data and the time to detect and mitigate the issue will be more predictable. Use Management Studio or the following script to configure time-based cleanup policy: SQL Copy ALTER DATABASE [QueryStoreDB] SET QUERY_STORE (CLEANUP_POLICY = (STALE_QUERY_THRESHOLD_DAYS = 90));
upvoted 5 times
...
OneplusOne
1 year, 4 months ago
B combined with SIZE_BASED_CLEANUP_MODE https://learn.microsoft.com/en-us/sql/relational-databases/performance/manage-the-query-store?view=sql-server-ver16&tabs=ssms#query-store-maximum-size
upvoted 1 times
...
Backy
1 year, 9 months ago
Selected Answer: C
C decreases the amount of collected data so less chances of reaching the limit
upvoted 3 times
...
eric0718
2 years ago
Selected Answer: B
The Max Size (MB) limit isn't strictly enforced. Storage size is checked only when Query Store writes data to disk. This interval is set by the Data Flush Interval (Minutes) option. If Query Store has breached the maximum size limit between storage size checks, it transitions to read-only mode. If Size Based Cleanup Mode is enabled, the cleanup mechanism to enforce the maximum size limit is also triggered.
upvoted 3 times
...
annaandalex2021
2 years, 1 month ago
Selected Answer: C
C is correct
upvoted 3 times
...
thedatadetective
2 years, 3 months ago
Selected Answer: B
This clears up the confusion in MS documentation...it specifically states that Flush parameters are what controls Max DB store https://docs.microsoft.com/en-us/sql/relational-databases/performance/how-query-store-collects-data?view=sql-server-ver15#remarks
upvoted 6 times
cusman
2 years, 1 month ago
After reading through that, I think B.
upvoted 5 times
...
...
arrakis968
2 years, 3 months ago
You can't really double or halve the Statistics Collection interval as that is a fixed value with a list of allowed values, see: sys.database_query_store_options You can't halve 15 minutes and can't double 1 hour. Flush Interval can be set to any arbitrary value above 1 minute. Makes sense to have the size checked more often. Tricky but very bad question.
upvoted 1 times
...
CaptainJameson
2 years, 4 months ago
Selected Answer: C
Correct answer is basically outlined in the explanation, only marked as incorrect 🤷‍♂️
upvoted 3 times
...
cura
2 years, 5 months ago
Correct answer is B
upvoted 2 times
...
cura
2 years, 6 months ago
Answer is C according to a lot of forums exponing this question....
upvoted 1 times
...
erssiws
2 years, 8 months ago
C should be the correct answer
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago