| A community of more than 1,600,000 database professionals and growing |
| | Interviews: Covering index Performance seems to be a part of every DBAs job. It should be a part of every developer's job, but I understand the focus to build software is different and many developers aren't sure how much a feature or option they work on will be used. They don't think too much about performance because at small scales, perhaps performance doesn't matter a lot these days with multiple cores and many GB of RAM. I'd disagree with that, but I understand the perspective. What's interesting to me is that in many interviews I've had over the years, I've not often been quizzed on specific scenarios that might help improve performance for queries. It seems many interviewers like to ask trivia questions such as the difference between a clustered and non-clustered index or what configuration knobs should I change. Code questions might be how to find duplicates in a table or deal with NULLs in aggregates. I hope that's changing and more interviewers are giving candidates scenarios, and looking for ways to ensure that candidates think about performance. I hope someone asks how a candidate looks at an execution plan or structures code to remove RBAR concerns. I wondered about this since I chatted with someone recently that had been asked about covering indexes in an interview and was struggling to understand how a covering index might be different than a clustered, nonclustered, filtered, or other type of index. This might seem like a trick question, and perhaps it is for some interviewers. After all, if you don't know, you might correctly guess what this means, but will you know this isn't a special type of index? Perhaps you'll try to bluff your way through the answer and hope you get close. Answering interview questions should be a discussion, as your answer can reveal as much about how you work as it can about your knowledge. Do you probe to understand the boundaries of the question or confirm that you know what's being asked? Do you admit when you don't know something or perhaps reason out loud? Do you give details that make sense, or do you launch into a lecture? In this case, you should understand that this index covers a query. This isn't a type of index, but rather a characteristic of an index against a particular query (or set of queries). To learn more, you might want to read a bit about adding included columns or how to evaluate your choice. If you don't know much about indexing, get started with an introduction or go through our Stairway to Indexing. Future versions of SQL Server will include automatic index tuning, but I think we'll always need to balance the number of indexes we have. We'll also often want to build some indexes that will ensure the system works fairly well when it's first installed. That means data professionals (DBAs ans developers) need to understand how indexes work and ensure they can choose a good index most of the time. Steve Jones from SQLServerCentral.comJoin the debate, and respond to today's editorial on the forums |
| The Voice of the DBA Podcast Listen to the MP3 Audio ( 3.8MB) podcast or subscribe to the feed at iTunes and Libsyn. The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. | |
|
|
| ADVERTISEMENT | | The industry standard for comparing and deploying SQL Server database schemas Trusted by 71% of Fortune 100 companies, SQL Compare is the fastest way to compare changes, and create and deploy error-free scripts in minutes. Plus you can easily find and fix errors caused by database differences. Download your free trial |
| |
|
|
| | | A CTE is a temporary result set defined by a simple query, and is used within the execution scope of a single INSERT, UPDATE, DELETE, or SELECT statement. In this article we will explore how to define and use CTE's. More » |
| Press Release from Redgate Resilient T-SQL code is code that is designed to last, and to be safely reused by others. The goal of defensive database programming, the goal of this book, is to help you to produce resilient T-SQL code that robustly and gracefully handles cases of unintended use, and is resilient to common changes to the database environment. More » |
| Additional Articles from SimpleTalk Joe Celko reminisces about the origins of databases and one of the early pioneers, Charles Bachman. He explains how pointer chains were used to traverse data in the NDL standard and referential integrity that we use today. More » |
| Guy Glantser from SQLServerCentral Blogs I just had an interesting case of performance tuning: a query with multiple predicates on a very large table. Something... More » |
| Jason Brimhall from SQLServerCentral Blogs It should come as no surprise that I write a lot of articles about Extended Events (XE). This happens to... More » |
|
|
| | Today's Question (by Steve Jones): I have data in a text file that looks like this. All spaces are single spaces. GameDate Visitor Home VisitorScore HomeScore 20180315 Oklahoma URI 78 53 20180315 WrightState Tennessee 47 73 20180315 NC-Greensboro Gonzaga 64 68 20180315 Pennsylvania Kansas 60 76 20180315 Iona Duke 67 89 If I want to load this into R as a set of fixed width data, what should I do? Assume the values in the widths parameter as correct. |
Think you know the answer? Click here, and find out if you are right. We keep track of your score to give you bragging rights against your peers. This question is worth 1 point in this category: R Language. We'd love to give you credit for your own question and answer. To submit a QOTD, simply log in to the Contribution Center. |
|
|
| |
ADVERTISEMENT | The company's new IT initiative, code named Phoenix Project, is critical to the future of Parts Unlimited, but the project is massively over budget and very late. The CEO wants Bill to report directly to him and fix the mess in ninety days or else Bill's entire department will be outsourced. Get your copy from Amazon today. | | |
|
|
|
|
|
| Yesterday's Question of the Day |
| Yesterday's Question (by Steve Jones): What are the rules for installing Localized Versions of SQL Server alongside English versions of SQL Server Answer: A localized language version can be installed alongside an English version Explanation: A localized language version can be installed alongside other localized versions or English versions. Ref: Local Language Versions - click here » Discuss this question and answer on the forums |
|
|
| Database Pros Who Need Your Help |
| Here's a few of the new posts today on the forums. To see more, visit the forums. Why aren't formatting tools working for me in SSMS 2017? - I'm a long time Data Developer and have been using SSMS quite heavily since 2005. I've never had an issue... AlwaysOn Availability Group - I have always-on availability group on two nodes cluster with read intent routing. When I stop availability group role in WSFC at... SSAS - Hi, Can you please provide What are the hardware ,software and licence cost details to build SSAS server. Thanks Prevent SQL Server error logs from writing to Windows Event Application log? - Hi All, Is there a way to prevent or redirect SQL Server error logs from writing to the Application Event Log... Query to merge data - I need to write a query to merge data.. basically all rows from one product (p1) should be assigned to... Setting up CDC - I'm trying to set up CDC and I get the following error when running the following script exec sys.sp_cdc_enable_table @source_schema = N'khtest', @source_name = N'dbo.test', @role_name... OPENROWSET and "Could not find installable ISAM" - Hi Folks, I have a problem with regards to querying an Excel Spreadsheet using not only OPENROWSET but also OPENDATASOURCE. I am... Linked Server to MS Access confirms connection succcess, but errors out on expanding catalog - Title says it all really. I've included the basic script, attached is the extended properties and extended results of sp_configure. Any... who is sysadmin - I am trying to find out which of the logged on users are sysadmin, what am I doing wrong, the... Using the Name of a CASE STATEMENT later on in a CONCAT - I understand why i can't do this (using CONCAT with "MOT2". For the same reason i couldn't use "FILER", but... Managing large table in SQL Server 2014 - Hi Guys, I have a large table that has around 11 million rows and is growing by about 1 million rows... Preparation of entry list according to subject - Hi, According to the purpose of the output, the output of the last entry on the output date as LIFO IF... Help with T-SQL (2008R2) - Hi, I'm creating a report and am trying to work out how to output the following info. First a bit about the... SQL 2008/R2 Extended Events - Row Count - I need to setup a sql audit to capture all queries running on a server from any unauthorized locations, and... Data Driven Subscription for 2008 Standard - I've read a lot of forum posts and a few blogs before resorting to creating this post. Nothing I've come... I am wondering if this is the best solution for my issue - so I have an account string I need to separate for interfacing to another third party system. I just learned... Is it necessary to manually start the full-text index population after creating the index with auto-tracking? - I have the code below, where a full-text index is created with auto-tracking. In the subsequent statement population is manually... How to convert to char in sql server - I'm running the code in ssrs that has sql server data source connection. Following is the code snippet of my query, How... Automatically create column names for flat file connector - Is there a simple way to get the SSIS flat file connector to automatically use column names when the incoming... The SQL Saturday Thread - As popular as SQL Saturday is, I'm surprised that nobody created a thread dedicated to SQL Saturday, so I created... |
|
| This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. | This newsletter was sent to you because you signed up at SQLServerCentral.com. Feel free to forward this to any colleagues that you think might be interested. If you have received this email from a colleague, you can register to receive it here. | This transmission is ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. Contact: webmaster@sqlservercentral.com |
|
|