Posted in Interview Q&A, SQL Development, SQL Server DBA
Tagged alwayson, answers, bank of america sql server interview questions, DBA, download sql server interview questions, indexes, performance tuning, questions, SQL DBA Interview Preparation, sql dba interview qith microsoft, sql interview, sql server tempdb interview questions and answers, SSIS, tempdb
This post can help you to understand the Database Auto Growth Setting Performance Impact in SQL Server. If Auto Growth setting is not taking as a serious option means you are missing a great chance to improve the performance. Well quickly understand few basics and then we’ll see how it impact the performance.
Q. What are the various size/space options available for database files in SQL Server?
Initial Size (MB): Indicates the initial reserved space for the database file.
Auto Growth / Max Size:
- Auto Growth: Controls the Auto Growth event. It again offers two options: In Percent || In Megabytes
- Maximum File Size: Defines the space limit. Offers two options: Limited to MB || Unlimited
Q. What is the Auto Growth event and when it occurs?
Covering Index Performance Impact in SQL Server
This post can help you to understand the “Covering Index Performance Impact in SQL Server”. First we’ll understand the covering index basics and we’ll see the performance impact using T-SQL code.
Q. What is a covering Index?
- A non-clustered index that is extended to include non-key columns in addition to the key columns is called as covering index.
- Non-Key columns are not considered by the Database Engine when calculating the number of index key columns or index key size.
- Need to use INCLUDE clause while creating index. This is mostly used to cover all columns in most frequently used queries in OLTP.
- Covering index covers a query that means this index contains all columns which are used in SELECT, JOIN, WHERE clause
- If you know that your application will be performing the same query over and over on the same table, consider creating a covering index on the table.
- A covering index Without INCLUDE clause is same as composite index.
Q. Why covering index is required?
- Covering Index is used to remove KEY or RID Lookups. When we design a query in OLTP where the query usage frequency is very high and every time the query is issuing KEY/RID lookups then we can get benefit by creating covering index.
- A covering index, which is a form of a composite non clustered index, includes all of the columns referenced in SELECT, JOIN, and WHERE clauses of a query.
- Since the index is covering all columns from the query, the index contains the data you are looking for and SQL Server doesn’t have to look up the actual data in the table which reduce the logical and/or physical I/O, and boosting performance.
- Also when we need to bypass the index limitations in number or size we can use Covering Index
Q. Since covering index improves the performance, I’ll create covering index to cover all of my queries. Does it make sense?