You Have A Database That Is Experiencing Deadlock Issues When Users Run Queries
You Have A Database That Is Experiencing Deadlock Issues When Users Run Queries
You need to ensure that all deadlocks are recorded in XML format.
What should you do?
Correct Answer: C
When deadlocks occur, trace flag 1204 and trace flag 1222 return information that is
capturedin the SQL Server error log. Trace flag 1204 reports deadlock information
formatted by each node involved in the deadlock. Trace flag 1222 formats deadlock
information, first by processes and then by resources.
The output format for Trace Flag 1222 only returns information in an XML-like
format.
A. LockAcquired
B. LockCancel
C. LockDeadlock
D. LockEscalation
Correct Answer: A
The Lock:Acquiredevent class indicates that acquisition of a lock on a resource, such
asa data page, has been achieved.
The Lock:Acquired and Lock:Released event classes can be used to monitor when
objects are being locked, the type of locks taken, and for how long the locks were
retained. Locks retained for long periods of time may cause contention issues and
should be investigated.
Module 1: Interpreted stored procedure.
You have a reporting database that includes a non-partitioned fact table named Fact_Sales.
The table is persisted on disk.
Users report that their queries take a long time to complete. The system administrator
reports that the table takes too much space in the database. You observe that there are no
indexes defined on the table, and many columns have repeating values.
You need to create the most efficient index on the table, minimize disk storage and improve
reporting query performance.
What should you do?
The columnstore index is the standard for storing and querying largedata warehousing fact
tables. It uses column-based data storage and query processing to achieve up to 10x query
performance gains in your data warehouse over traditional row-oriented storage, and up to
10x data compression over the uncompressed data size.
A clustered columnstore index is the physical storage for the entire table.
Users frequently run the same query with different values for the local variable @lastName.
The table named Person is persisted on disk.You need to create an index on the
Person.Person table that meets the following requirements:
1. All users must be able to benefit from the index.
2. FirstName must be added to the index as an included column.
What should you do?
By including nonkey columns, you can create nonclustered indexes that cover more queries.
This is because the nonkeycolumns have the following benefits:
They can be data types not allowed as index key columns.
They are not considered by the Database Engine when calculating the number of index key
columns or index key size.
Users report that the following query takes a long time to complete.
A filtered index is an optimized nonclustered index, especially suited to cover queries that
select from a well-defined subset of data. It uses a filter predicate to index a portion of rows
in the table. A well-designed filtered index can improve query performance, reduce index
maintenance costs, and reduce index storage costs compared with full-table indexes.
You need to add the most efficient index to support the new OLTP workload, while not
deteriorating the existing Reporting query performance.
What should you do?
A filtered index is an optimized nonclustered index, especially suited to cover queries that
select from a well-defined subset of data. It uses a filter predicate to index a portion of rows
in the table. A well-designed filtered index can improve query performance, reduce index
maintenance costs, and reduce index storage costs compared with full-table indexes.