Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
 
The Voice of the DBA
 

Evaluating a DBA (or AI)

This editorial was originally published on Jun 18, 2021. It is being republished as Steve is away at VS Live.

Interviewing is difficult for many organizations. Often they don't have a consistent process, and very often the people that do initial screening don't know much about what a DBA does. Many of the somewhat trivial questions I see on Internet lists (what's a clustered index?) are suited for someone getting started in the business, not for hiring an experienced DBA.

Sure, an experienced person ought to be able to answer those questions, but the real world often requires more nuanced questions that relate to the situations we find ourselves in. I found a list from Joey D'antoni recently, which has lots of open ended questions, designed to allow someone to talk about what they know and think, giving the interviewer the chance to gauge their level of expertise.

I especially like the questions around tuning and configuration. Tell me what you've done in the past and why. That way someone can tell you a story about their experience and then relate this to practice solutions. There is no good way to talk about these situations if you haven't lived them. You might read someone's blog, but a few follow-up questions on details will show whether you really understand the solutions or not.

Of course, you need a good interviewer that knows something about these topics to understand whether the answers make sense or not. An HR person or manager isn't likely going to be able to judge how a candidate performs. While a developer or sysadmin might be able to gauge whether the person has spent time with SQL Server, if you need a really experienced person, you need someone equally experienced to interview them. That can be a challenge for some companies.

Hiring is difficult, but with more junior or intermediate positions, it might not matter as much. Evaluate whether the person has some knowledge and fits with your team. Can they work with others, which isn't the same as just agreeing with them. Maybe more importantly, can they learn. Do they learn from your questioning, or have they shown they are learning.

For more senior people, references and networking matter a lot. If others recommend them (or don't), that says a lot. It's good to initially decide if this person is a good fit, and then engage someone like Joey or Glenn Berry (or Tim Mitchell in the BI space) that might provide a better evaluation of your short listed candidates.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 
 Featured Contents
SQLServerCentral Article

Implementing Type 4 Slowly Changing Dimensions in SQL Server

Dinesh Asanka from SQLServerCentral

Learn about a Type 4 Slowly Changing Dimension in this article by Dinesh Asanka.

Technical Article

SQL Server login failures: how to monitor, report, and alert on them

Additional Articles from SQLServerCentral

This guide walks through how to pull login failure data using sys.xp_readerrorlog, filter it by time and error type, parse it into readable columns, aggregate repeat offenders, and automatically email a summary report — turning a passive log file into an active security and troubleshooting tool.

Blog Post

From the SQL Server Central Blogs - T-SQL Tuesday #202: 100 Hours

Steve Jones - SSC Editor from The Voice of the DBA

It’s time for T-SQL Tuesday again and this is a great prompt to start writing. I might have written about this before, but it’s a story that sticks with...

Blog Post

From the SQL Server Central Blogs - Exploring DiskANN: Part 2: PQ, SSDs, caching and beam search

Diligentdba 46159 from Mala's Data Blog

How I used AI for this postChatGPT to generate images based on info specifically provided by me,including examples.Grammarly to catch grammar and sentence construction errors. In Part 1, we...

The Phoenix Project

The Phoenix Project: A Graphic Novel about IT, DevOps, and Helping Your Business Win

Site Owners from SQLServerCentral

Adapted from the acclaimed bestselling book, The Phoenix Project Graphic Novel Volume 1 introduces readers to a stalwart cast of characters as they are challenged by the four types of work that impact complex workflows.

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

The Disabled Index

I run this code on SQL Server 2022.
CREATE TABLE Drink
(
    drinkid INT NOT NULL
        CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
    drinkname VARCHAR(20),
    rating NUMERIC(2, 1)
)
GO

INSERT INTO Drink
(
    drinkid,
    drinkname,
    rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by aniap)

ORDER BY alias

There is a table tmp_tab:

CREATE TABLE tmp_tab (
id int,
val int
);
INSERT INTO tmp_tab VALUES
(1, 1),
(2, NULL),
(3, 3),
(4, 4),
(5, 5);

You want to order the rows ids by the following expression:

    ISNULL(val, id) + 1

Which of the following queries produces the expected ordering and why? (Select all correct)

Answer: SELECT id, ISNULL(val, id) + 1 val FROM tmp_tab ORDER BY val;

Explanation: When you `ORDER BY ` that   can be: 1. an output column name, 2. the ordinal number of an output column, 3. an expression built from input columns. So, for the above SELECT queries: Answer 1) refers to opt.1 - "an output column name"

SELECT id, ISNULL(val, id) + 1 val
FROM tmp_tab
ORDER BY val;    -- orders by alias "val"

and gives the correct id ordering: 1, 2, 3, 4, 5; Answer 2) refers to opt.3 - "an expression built from input columns"

SELECT id, ISNULL(val, id) val
FROM tmp_tab
ORDER BY val + 1;    -- orders by column "val" (with NULLs)

so the resulting order of id is: 2, 1, 3, 4, 5 (nulls first); Answer 3) also refers to opt.3

SELECT id, ISNULL(val, id) val_new
FROM tmp_tab
ORDER BY val_new + 1  -- tries to order by column "val_new " but cannot find it

and returns an error "Invalid column name 'val_new'." ORDER BY combines two historically distinct ideas: referring to an output column and evaluating a sorting expression over input columns. For short - an output-column alias can be used only when it appears as a standalone `ORDER BY` item; it is forbidden to use the column alias as a part of some expression in ORDER BY clause, to avoid ambiguity. Ref: https://learn.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql?view=sql-server-ver17#order_by_expression  

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.


SQL Server 2019 - Administration
How do I connect to a SQL Server database on my ISP? - I've got a web application for my side business. I've added a SQL Server 2019 database to it. Now, I'm trying to connect to it using SSMS 20.2 and also Visual Studio Code. I've been following the instructions they have here which seems straight forward to me. The error I'm getting from Visual Studio Code […]
SQL Server 2019 - Development
advice on ssrs version control - Hi we're a bit behind on versioning ssrs.  I think we have over 1600 reports, 65 data sources and over 700 folders on our main sql server.  And a smaller amount on a separate sql server in one of our plants.    for some reason we also keep xls (over 400) , pdf's (over 3,000) […]
Editorials
The Costs of Multiple Platforms - Comments posted to this topic are about the item The Costs of Multiple Platforms
Looking for New Blood - Comments posted to this topic are about the item Looking for New Blood
The End of Summer - Comments posted to this topic are about the item The End of Summer
Measuring Productivity - Comments posted to this topic are about the item Measuring Productivity
Article Discussions by Author
Stored Procedures for Server-Level Object and Column Search - Comments posted to this topic are about the item Stored Procedures for Server-Level Object and Column Search
Databricks Genie Spaces for SQL Analysts: Natural Language Querying Without Leaving Your Data Platform - Comments posted to this topic are about the item Databricks Genie Spaces for SQL Analysts: Natural Language Querying Without Leaving Your Data Platform
RegEx Functions II - Comments posted to this topic are about the item RegEx Functions II
Adding new column with DEFAULT - Comments posted to this topic are about the item Adding new column with DEFAULT
Server-Level Row Counts for Tables and Views - Comments posted to this topic are about the item Server-Level Row Counts for Tables and Views
Hyperscale Replicas I - Comments posted to this topic are about the item Hyperscale Replicas I
Parameter Sensitive Plan Optimization vs. Parameter Sniffing: What SQL Server Fixes and What It Doesn't - Comments posted to this topic are about the item Parameter Sensitive Plan Optimization vs. Parameter Sniffing: What SQL Server Fixes and What It Doesn't
Importing Excel files into SQL Server using DuckDB and Python - Comments posted to this topic are about the item Importing Excel files into SQL Server using DuckDB and Python
SQL Server 2022 - Administration
Performance Regression After Upgrading from SQL Server 2016 to 2022 - Bonjour à tous, La semaine dernière, nous avons effectué une mise à niveau de notre instance SQL Server, en passant de SQL Server 2016 à SQL Server 2022. Au début, tout s'est bien passé et nous avons défini le niveau de compatibilité de la base de données à 160 comme recommandé. Cependant, peu après la […]
 

 

RSS FeedTwitter

This email has been sent to {email}. 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.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -