You administer a Microsoft SQL Server 2012 database that contains a table named AccountTransaction.
You discover that query performance on the table is poor due to fragmentation on the IDX_AccountTransaction_AccountCode non-clustered index.
You need to defragment the index. You also need to ensure that user queries are able to use the index during the defragmenting process.
Which Transact-SQL batch should you use?
A. ALTER INDEX IDX_AccountTransaction_AccountCode ON AccountTransaction.AccountCode REORGANIZE
B. ALTER INDEX ALL ON AccountTransaction REBUILD
C. ALTER INDEX IDX_AccountTransaction_AccountCode ON AccountTransaction.AccountCode REBUILD
D. CREATE INDEX IDXAccountTransactionAccountCode ON AccountTransaction.AccountCode WITH DROP EXISTING
You administer a Microsoft SQL Server 2012 database that contains a table named AccountTransaction. You discover that qu
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
You administer a Microsoft SQL Server 2012 database that contains a table named AccountTransaction. You discover that qu
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!