exam questions

Exam 70-767 All Questions

View all questions & answers for the 70-767 exam

Exam 70-767 topic 1 question 86 discussion

Actual exam question from Microsoft's 70-767
Question #: 86
Topic #: 1
[All 70-767 Questions]

You have a data warehouse named DW1. All data files are located on drive E.
You expect queries that pivot hundreds of millions of rows for each report.
You need to modify the data files to minimize latency.
What should you do?

  • A. Add more data files to DW1 on drive E.
  • B. Add more data files to tempdb on drive E.
  • C. Remove data files from tempdb
  • D. Remove data files from DW1.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
The number of files depends on the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to eight, use the same number of data files as logical processors. If the number of logical processors is greater than eight, use eight data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/databases/tempdb-database

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
Lukis92
4 years, 5 months ago
Create as many files as needed to maximize disk bandwidth. Using multiple files reduces tempdb storage contention and yields significantly better scalability. However, do not create too many files because this can reduce performance and increase management overhead. As a general guideline, create one data file for each CPU on the server. https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms175527(v=sql.105)?redirectedfrom=MSDN
upvoted 1 times
Hoglet
4 years, 4 months ago
When PSSSQL first came up with this advice, it was really for a particular use-case, when lots of objects are being created in tempdb in succession by different processes. But they didn't make it clear. And now it's baked into the installer *sigh* The contention that *could* occur in tempdb is on the SGAM page. The first extent of a new table is a mixed extent and SQL Server will check the 1st SGAM of the file, and this page potentially becomes a bottle neck. With having multiple files, object creation is done round-robin. So 2 processed go into 2 different tempdb files and can create new objects without contention. If we are pivoting lots of data, we could be spilling to tempDB. Adding files will not solve (work) table creation issues, how many work tables are going to get created in tempdb. Putting files on different spindles would potentially help
upvoted 1 times
...
...
BelierOne
4 years, 5 months ago
Finally, what is the correct response here?
upvoted 1 times
...
DudeHere
4 years, 5 months ago
DAtabase 101 says to ensure you have 1 file per PROC in temp DB up to 8.
upvoted 2 times
...
Slava_bcd81
4 years, 7 months ago
-the question is not about tempdb, so it's not B or C -I would choose rather A see - https://www.sqlskills.com/blogs/paul/benchmarking-do-multiple-data-files-make-a-difference/
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