exam questions

Exam DP-203 All Questions

View all questions & answers for the DP-203 exam

Exam DP-203 topic 1 question 71 discussion

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

You have an Azure Synapse Analytics dedicated SQL pool named Pool1. Pool1 contains a table named table1.

You load 5 TB of data into table1.

You need to ensure that columnstore compression is maximized for table1.

Which statement should you execute?

  • A. DBCC INDEXDEFRAG (pool1, table1)
  • B. DBCC DBREINDEX (table1)
  • C. ALTER INDEX ALL on table1 REORGANIZE
  • D. ALTER INDEX ALL on table1 REBUILD
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
MrWood47
Highly Voted 2 years, 5 months ago
Selected Answer: D
D. ALTER INDEX ALL on table1 REBUILD This statement will rebuild all indexes on table1, which can help to maximize columnstore compression. The other options are not appropriate for this task. DBCC INDEXDEFRAG (pool1, table1) is for defragmenting the indexes and DBCC DBREINDEX (table1) is for recreating the indexes. ALTER INDEX ALL on table1 REORGANIZE is for reorganizing the indexes.
upvoted 30 times
...
aemilka
Highly Voted 2 years, 2 months ago
Selected Answer: C
Reorganizing an index is less resource intensive than rebuilding an index. For that reason it should be your preferred index maintenance method, unless there is a specific reason to use index rebuild. https://learn.microsoft.com/en-us/sql/relational-databases/indexes/reorganize-and-rebuild-indexes?view=sql-server-ver16
upvoted 7 times
[Removed]
2 years, 1 month ago
As far as I can see, your quoted article does not refer to Azure Synapse Analytics dedicated SQL pool. I think rebuild is the only supported option for dedicated SQL as can be found here: https://learn.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-tables-index
upvoted 8 times
aemilka
2 years, 1 month ago
Yes, I agree with you, I haven't noticed that the article does not apply to Synapse Analystics. D seems to be only possible answer.
upvoted 6 times
...
...
Homer23
1 year, 3 months ago
https://learn.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-tables-index // For a table with an ordered clustered columnstore index, ALTER INDEX REORGANIZE does not re-sort the data. To re-sort data, use ALTER INDEX REBUILD // The question state "columnstored" table, so D
upvoted 1 times
...
...
JustImperius
Most Recent 5 months ago
Selected Answer: D
Definitely D. REORGANIZE is for light maintenance, to compact small rowgroups and clean up delta stores without a full rebuild. It's faster and less resource-intensive. REBUILD when the table has significant fragmentation or many delta stores. It recreates the entire index, providing MAXIMUM compression and performance improvement. Use for large-scale maintenance.
upvoted 1 times
...
EmnCours
6 months, 3 weeks ago
Selected Answer: D
Correct Answer: D
upvoted 1 times
...
Okea
7 months, 2 weeks ago
Answer is C https://learn.microsoft.com/en-us/sql/relational-databases/indexes/columnstore-indexes-query-performance?view=sql-server-ver16 If the number of deleted rows for several rowgroups is large enough to be merged into fewer rowgroups, reorganizing the columnstore increases the quality of the index and query performance improves. If your data deletion process usually empties entire rowgroups, consider using table partitioning
upvoted 1 times
...
renan_ineu
9 months, 4 weeks ago
I saw all the documentations here and found another one that makes pretty clear the correct option is option D: "By default, tables are defined as a clustered columnstore index. After a load completes, some of the data rows might not be compressed into the columnstore. There's a variety of reasons why this can happen. To learn more, see manage columnstore indexes. To optimize query performance and columnstore compression after a load, rebuild the table to force the columnstore index to compress all the rows." https://learn.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-load-from-azure-data-lake-store#optimize-columnstore-compression
upvoted 2 times
...
Yoleri
10 months ago
The answer is D. Why not C because ALTER INDEX ALL on table1 REORGANIZE is used for defragmenting the index, but it doesn’t achieve the same level of compression as a full rebuild.
upvoted 1 times
...
Charley92
1 year, 4 months ago
Selected Answer: D
To maximize columnstore compression for table1 in Azure Synapse Analytics dedicated SQL pool, you should execute the following statement: ALTER INDEX ALL on table1 REBUILD The REBUILD option is used to rebuild all indexes on the table, which will maximize columnstore compression for table1. This option is recommended when a large amount of data has been added to the table, as in this case where 5 TB of data has been loaded into table1
upvoted 2 times
...
ukivanlamlpi
1 year, 7 months ago
what is the different between "Alter Index Rebuild" or "DBCC DBREINDEX"
upvoted 2 times
...
kkk5566
1 year, 9 months ago
Selected Answer: D
D. ALTER INDEX ALL on table1 REBUILD
upvoted 1 times
...
Deeksha1234
1 year, 10 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
vctrhugo
1 year, 12 months ago
Selected Answer: D
ALTER INDEX REORGANIZE is used for rebuilding or reorganizing indexes, but it does not maximize columnstore compression.
upvoted 1 times
Matt2000
1 year, 10 months ago
I agree. A rebuild can compress the data more efficiently within each combination of distribution and partition: It can open such existing columnstore segments and shuffle data within them (and the deltastore) to maximize compression for the resulting compressed columnstore segments. That is not possible when reorganizing. That process only changes compressed columnstore segments by physically deleting logically deleted rows and combining small columnstore segments into larger ones.
upvoted 1 times
...
...
Rajan191083
2 years, 1 month ago
Reorganize is for row store indexes. The question here clearly mentions column store indexes. Correct answer is D
upvoted 2 times
...
MuhilMahil
2 years, 1 month ago
Selected Answer is C. reorganizing only help in optimizing compression and performance.
upvoted 1 times
...
Vedjha
2 years, 4 months ago
Why not C? When reorganizing a columnstore index, the Database Engine compresses each closed row group in delta store into columnstore as a compressed row group. Starting with SQL Server 2016 (13.x) and in Azure SQL Database, the REORGANIZE command performs the following additional defragmentation optimizations online: Physically removes rows from a row group when 10% or more of the rows have been logically deleted. For example, if a compressed row group of 1 million rows has 100,000 rows deleted, the Database Engine will remove the deleted rows and recompress the row group with 900,000 rows, reducing storage footprint.
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 ...