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

Daily Coping Tip

Make an effort to have a friendly chat with a neighbor.

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.

Column vs Row

I've been working with databases for a long time. They've always been relational databases to me, unless they were a key-value, document, or NoSQL class of store. A few years ago at the Pass Summit, David Dewitt gave a keynote on changes to storage that Microsoft was implementing, talking about columnar storage.

At first the structure felt confusing, but as he proceeded, it started to make sense. We don't like SELECT * for many reasons, but one is that lots of unnecessary data gets moved off disk, into memory, and across a network. This is the nature of a row based store, which is what we usually have in relational databases.

The columnar store puts all the columns together. The row values from different columns are separate, but if you are aggregating values in columns, the columnar store works very well.

So well, that we have columnstore indexes in SQL Server, which copy your data into a column-oriented format. While this might seem wasteful, you decide what gets copied, and you get the benefits of this format, which dramatically speeds up some types of queries.

The reason we have both stores is that we have a need for both to fulfill different query needs. I wouldn't keep both stores for every table, but for some, it's the best way to ensure your clients don't spend a lot of time waiting for results.

I see more clients using columnstore indexes, and I was still seeing some sessions, but not as many as a few years back when the technology was new. If you've never tried building a columnstore index, this might be something you experiment with in development systems and understand how this can change your query performance and storage needs. We have a great Stairway Series to get you started, so take some time this year and read through it and practice the examples.

Steve Jones - SSC Editor

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

 
 Featured Contents

Syncing your SQL Server database backups to an AWS S3 bucket

Steve Rezhener from SQLServerCentral

Introduction "Sometimes" just having all the database backups in one place is not enough. In fact, most of the time, putting all the eggs in one basket is a bad idea. You want to have some piece of mind that during the time of crisis, all your database backups are restorable. This is probably why […]

Search SQL Server error log files

Additional Articles from SimpleTalk

The SQL Server error log is helpful for troubleshooting issues. Greg Larsen demonstrates several ways to search SQL Server error log files.

From the SQL Server Central Blogs - Set up connection from Azure Data Factory to Databricks

KamilN78 from SQL Player Blog

Both, Azure Data Factory and Azure Databricks offer transformations at scale when it comes to ELT processing. On top of that, ADF allows you to orchestrate the whole solution...

From the SQL Server Central Blogs - Added another 3 new PowerShell functions for reports on Power BI Report Server

Aaron Nelson from SQLvariant

I finally did it. I created a function I’ve been wanting to be able to use for *years*. Test-RsRestItemDataSource is here. I can’t tell you how many times I’ve...

 

 Question of the Day

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

 

Tempdb Improvements in 2019

In SQL Server 2019, tempdb has which improvement to help with system table contention with latches?

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)

Python List to Tuple

In Python 3.7, how do I convert this list into a tuple named "days"?

AllDays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']

Answer: days = tuple(AllDays)

Explanation: The tuple() function will convert a list into a tuple. Ref: tuple() - https://www.geeksforgeeks.org/python-tuple-function/

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
Can't import certificate - Hello, For a SCCM installation, we have been told we need to install a certificate.  I am supposed to install it in configuration manager. I go to the certificate tab.  However, I don't see an import.  I've looked up the internet and see where I should be seeing an import button.  I am an admin […]
Using SQL Configuration Manger 2019 on SQL 2017 instances. - I'm hoping this is a simple (obvious) question... I'm charged with implementing a solution for TLS encrypted connections to 3-node SQL Server  2017 Always-On AG.  I was reading in the documentation that SQL Configuration Manager 2019 greatly simplifies deployment/management of certificates across the AG and that Configuration Manager 2019 can be used on earlier versions. […]
SQL Server 2017 - Development
Convert International Character-String Date Formats - We are receiving some international text file(s) with date(s) (and other fields) in languages other than english (dez, déc, etc). Does anyone know of a method to try and convert dates into a us-english format? Here is what was tried at the moment: DECLARE @Date varchar(20), @Date1 VARCHAR(20), @Date2 VARCHAR(20) SET @Date = '25 déc […]
Stored Proc:Can I use a parameter of comma separated Id\'s within a WHERE clause? - I need to return records that contain one of several primary key Id's (these Id's are INT data types).  The id's will be passed into the stored procedure via a varchar containing the id's separated by commas.  I'd like to then use these Id's within my WHERE clause but I'm not sure how. Ex. DECLARE […]
SQL Server 2016 - Administration
Query plans not getting cached - Just wanted to know what this could be   I have a simple query that takes 1 min for the initial run and then it takes less than 10 secs after the second run in test environment and I can see the query in the cached plans I run the same thing in prod it […]
SQL Server 2016 - Development and T-SQL
Replacing String Between Two HTML Tags - Hi all, I could use some assistance with this one as I can't get anything working correctly for it at the moment. I'm having to move some HTML formatted data between two applications and they have a few differing quirks regarding how they handle HTML formatting. The specific quirk that is causing me issues is […]
Counting Daily Active Accounts per Category - Hello everyone, I am trying to get the number of daily active accounts per given category. I have the following table that contains accounts, their category, and when they moved into that category. ` ID     Category       Category_Date 11       1                        2021-01-05 12      3                       2021-01-05 11       2                       2021-01-18 12      2                       2021-01-19 14      5                      […]
Stored procedure performance issues - I've been tasked with improving the performance of a colleagues stored procedure, and could really do with some advice to ensure that I don't lead them down the wrong path. The stored procedure creates a temp clustered index based on values from a user table-value function output (input for this function is one of the […]
SQL 2012 - General
How to replace OR statment on revision by another best practise and more perform - How to replace OR statement on revision by another best practise and more performance ?   I work on SQL server 2012 I face issue I need to use any thing alternative or best from using OR statement multiple time . so How to use any solution without Using OR statement on Revision with another […]
SQL Server 2019 - Administration
TDE With Log shipping - Our environment is SQL Server 2019. I'm new to TDE and am having to learn it because of a vendor request, but I am having trouble finding a similar environment to ours as I Google. We have a vendor's healthcare application my company uses and the DB supporting the app is in a cloud environment […]
2019 SSRS Install problem - We're upgrading from 2012 to 2019 and I'm running into multiple issues with SSRS 2019. But let me start with the basic one. How do we install the dev version of this as a named instance? It installs as "SSRS" but I want to install it as our old instance name so we don't have […]
SQL Server 2019 - Development
SQL Query - Get Start/End Date per Employment Period - Hi All, Need to get Start and End Date per eployment period, meaning an employee can be hired and rehired. I attached a sample data and desired output.   Thanks
It does not keep the data in the table being filled from a stored procedure - I would like to know why when consulting a table that is filled with a stored procedure and the last one is called with an openrowset, it does not return data. Example CREATE TABLE dbo.Test (Id INT, Nombre VARCHAR(10)) GO CREATE PROCEDURE ProcedureTest1 AS BEGIN INSERT INTO dbo.Test VALUES(1, 'Deblin') SELECT * FROM dbo.Test END […]
Why I have problem with adding IDENTITY in my table? - I want to create Table which name is ARTIKAL. Also I want to set Identity  in ID column but every time when I run my code I get this. Here is the code CREATE TABLE [dbo].[ARTIKAL] ( ID int IDENTITY(1,1) NOT NULL, Naziv char(10) NOT NULL, Cena decimal (5,2) NOT NULL, Kolicina int NOT NULL, […]
Reporting Services
Long running report- kill the session - There are few reports in our environment which run on read only replica, but they take over 3+hrs. We have decided that any report that runs for more than 2 hrs should be killed and rolledback. How do we identify that that report was killed (session was killed) due to this reason? Should I write […]
 

 

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

 

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