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

Daily Coping Tip

Connect with someone near you – share a smile or chat

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

Representative Data Challenges

One of the areas where machine learning and artificial intelligence have had lots of success is with image work. Whether identifying people in pictures or helping cars stay on the road and out of each other's way, this capability of computing has worked well. It's not perfect, and not necessarily as accurate as most humans, but it works well. At least well enough. Sometimes it's even better than humans.

There are issues, however, and I think some of them are because of poor data sets. Last year when the pandemic hit, education was challenged with how to conduct remote exams. While there are some solutions, they don't always work well. Sometimes the algorithms don't recognize people, especially non-Caucasians.

The issues raised reminded me of the issues with some bathroom gadgets. I have fairly dark skin, and I've always wondered why some sinks and soap dispensers wouldn't work for me. I hadn't thought much about it until I saw a few reports like the one listed above.

I don't think there is anything malicious here, but I do think that often we find teams work on a happy path when building some new tool. They test it often themselves, but they don't think widely about how a variety of customers will use things. While I've seen many personas, I often don't see anyone creating personas that might consider something like skin color, or even a different culture. We often consider roles, without deeply examining how those roles are implemented.

We need to work with representative data in whatever area we work, but data that does include some of the edge or corner cases that might come up. Our dev and test areas can start with small data sets, including those that we build, but at some point we need representative data. Whether we're building OLTP software, sensors, or image recognition, our data should be well rounded.

While systems don't need to solve every issue, we ought to consider a large percentage. In the case of imaging, certainly understanding the wide variety of type of people that can use products would seem to be important. Hopefully future teams won't make the mistake of assuming that most of their customers look exactly like them.

Steve Jones - SSC Editor

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

 
 Featured Contents

The CAST operator in PostgreSQL

sabyda from SQLServerCentral

Introduction Cast is a technique in PostgreSQL with which we can convert a value of one datatype into another. We can perform various cast operations in PostgreSQL for converting one datatype to another, such as the String datatype to the Integer datatype (or the Boolean datatype or datetime datatype) and vice versa. This article will […]

Create Azure DevOps Analytics Visuals with Power BI OData Queries

Additional Articles from SQLServerCentral

This article focuses on the use of OData Queries to integrate DevOps Analytics data to Power BI.

Gitflow Workflow Feature Branching for SQL Database Projects

Additional Articles from MSSQLTips.com

Learn how to use Gitflow workflow to meet the needs of developing new database related features and how to deploy these database changes.

From the SQL Server Central Blogs - Install Python on Windows

epivaral from SQL Guatemala

Python is the most famous development language today.
This is because is open-source, scalable and robust. It can run in almost any device with a processor (or microprocessor, we will...

From the SQL Server Central Blogs - SQLSaturday Doesn’t Have to Be a Platform

Andy Warren from SQLAndy

When we built the first SQLSaturday it was about 2 pages of HTML. No login, no tools, just get it done. Worked ok. Didn’t work so well for the...

 

 Question of the Day

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

 

What hasn't changed?

I've got two ways to aggregate sales in a table. I see this code in a report:
select NULLIF(SUM(saletotal), SUM(s.salefinaltotal)) as Comparison
from dbo.SaleHeader
What value should I get from this function if the two aggregates are equal?

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

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

Reversing a String in Python

I have a string in Python v3.8 that I want to reverse. What code will do this?

MyString = "SQLFamily"

Answer: MyString[::-1]

Explanation: The correct way to do this is to slice the string with a negative index. We leave the start and end off, using the defaults of 0, and then use a negative step to reverse things. Ref:

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 2017 - Administration
Help on turning query - hi there: we are using sql2017 std version.  Query plan attached here. I found that sort operator was having the biggest operator cost. Any suggestion to tune this query?  I am starting to work on tuning.. please forgive some naïve questions I may post from time to time. Thanks Hui
Exchange Event in SQL Profiler - Hi all. I received a Deadlock Graph and saw that I have Exchange Event in it. I read that it means the problem with parallelism. I have such a query: SELECT * FROM TABLE Account WHERE ID NOT INT (SELECT * FROM TABLE Account WHERE ...) Could this be the reason in the subqueries and […]
Performance - I am assisting with a migration. doing a V to V migration from a legacy environment to the hosted infrastructure. I want to do some baseline testing and wondered if there are some scripts i could run in SQL that i could run on the legacy and on the new environment to compare so I […]
SQL Server 2017 - Development
xp_cmdshell - System Cannot Find the Path Specified - Dear Group: This is my first attempt at using the xp_cmdshell command, but right now, I am trying to run it inside SSMS.  We need to create a procedure to unzip files so that we can import the data into our tables.  I am trying to use PKWare SecureZip to do this, as I have […]
SQL Server 2016 - Administration
High CPU and plan cache instability - In the past couple of months my SQL Server instance has been experiencing higher than usual CPU usage than before, at times hitting 100% and affecting an application. There have been no recent changes to any SQL Server configurations or options in that time, the OS may have in terms of Patching but that is […]
SQL Server 2016 - Development and T-SQL
Automated Deployment Scripts - I'm wondering what other people are using to create deployment scripts.  We have to create a script and deploy to 3rd party tool for deployment to each environment.  We use TFS/Jira, so any scripts that get created are associated to a Jira item as well as put in TFS.  The issue is, that when our […]
Table Elimination In a View - I'm experiencing a situation similar to the overly simplified example provided here CREATE TABLE dbo.Sales ( DateKey INT ,Quantity INT ) INSERT INTO dbo.Sales VALUES ( 20210101 ,5 ) ,( 20210102 ,15 ) ,( 20210103 ,4 ) ,( 20210104 ,8 ) ,( 20210105 ,23 ) ,( 20210106 ,47 ) ,( 20210107 ,31 ) ,( 20210108 […]
Import JSON in SSIS with Column Row Transformed - I’m attempting to modify the code on this SQL Server Central article "Approaches to Import JSON in SSIS (SQL Server 2016+) Part 2" using the methods described under “Using SQL Functionality”. I'm successfully using this with other JSON files formatted in a more standard way. However, the JSON flat file that I’m tasked with bringing […]
Update large table rows within a group - I have a large employee table with lots of columns and versions and one org lookup table also with some versions. I need to update a column org_id in employee table  which is all nulls now with no history. An employee can have multiple versions records each with same empid but same or different rc_code. […]
CAST(NULL AS varchar(1)) - Hello All, I have been tasked to improve a very old SQL code we have and first thing I see (may not necessarily be the candidate for performance improvement though) going through the code is many CASE records with CASE WHEN myColumn IS NULL THEN CAST(NULL AS varchar(1)) .... Can one advise why someone would […]
Development - SQL Server 2014
Tuning Complex Procedures - Hello, I was wondering if anyone has written something like this.  Basically I am trying to tune some stored procedures and I am looking for a stored procedure or tool that would allow me to run a problematic stored procedure a specified number of iterations and then aggregate results like CPU, Reads, Writes, Etc to […]
SQL Server 2019 - Administration
SSIS jobs - we are actually not using a file logger for our SSIS jobs, the logging is done to the database. File logging is in addition, I was thinking to log them on the same server instead of shared location. Do you see any issues?  
SQL Permissions - My understanding is you can't grant access to users with select, View database and view definitions etc. at instance level without any user databases created on it. Please advise?
authgrowth log during rebuil index - Good morning all , Have any idea how I can reduce disk consumption during the reindexing phase I use the IndexOptimize procedure of the olla script  
Analysis Services
SSAS Tabular SSDT DAX Drillthrough Issue - Hello, I've come across a scenario where the drillthrough functionality is not working when multiple dates from a fact table is joined to a single date dimension. If I have a fact table with multiple status dates e.g. Resolved Date, Logged Date and join it to one Date dimension table, one of the relationship would […]
 

 

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

 

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