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

Daily Coping Tip

Show an active interest by asking questions when talking to others

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.

The Growth of T-SQL

I saw this tweet recently, where Richie Rump asked what has changed in T-SQL since the SQL Server 2012 version. A few people from Microsoft responded that there were changes in all versions, and while I think some versions have few changes, I decided to look.

SQL Server 2012 introduced the window functions with the OVER() clause to SQL Server. This was a huge change in that many aggregate queries were much easier to write without needing complex GROUP BY lists and subqueries or unions to join together different data. While I'm not an expert by any means, I find lots of queries for reporting easier to write with the window functions, and I've grown to enjoy using these in code.

Looking across other versions, I've seen these changes:

SQL Server 2014

  • UTF-8 for Bulk insert
  • SELECT..INTO works in parallel
  • In-Memory OLTP language enhancements

SQL Server 2016

  • temporal tables
  • JSON support
  • more In-Memory T-SQL changes
  • Security - DDM, RLS, AE T-SQL changes
  • R services

SQL Server 2017

  • graph query
  • CANCAT_WS, TRANSLATE, TRIM, WITHIN GROUP
  • BULK INSERT options
  • Memory-optimized enhancements (CASE, TOP, JSON, computed columns
  • Python language services

SQL Server 2019

  • Graph enhancements
  • UTF-8
  • Java and other language enhancements

Some of these were to support other features, so perhaps these aren't really T-SQL changes per se. If I look at PostgreSQL release notes, I see enhancements and changes, but relatively few new language changes. Certainly, there are some additions, but lots of improvements, which I think reflect the nature of a mature product. Not a lot of new things, but regular improvements and refinements to existing items.

I've been working with SQL Server since 1991, and it feels like T-SQL has grown a lot in that time. Back then it felt like there were relatively few keywords and functions, requiring complex coding for tough problems. Now, with the way the language changed a lot in 2005, 2012, and 2016, it feels like we have a lot of tools at our disposal. We could always use more, and I hope see more useful changes in future versions to come.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

What is ChatGPT – Is it the rise of the Skynet era?

Daniel Calbimonte from SQLServerCentral

An interesting conversation with the ChatGPT artif...

External Article

An Introduction to Assessing Normal Distribution with Python

Additional Articles from MSSQLTips.com

This tip illustrates graphical and statistical tec...

External Article

How do your DevOps plans really measure up?

Additional Articles from Redgate

Digital transformation seems to be on the to-do list of every organization at the moment. Alongside it, DevOps is one of those buzzwords that gets lumped in, with some vague intention of having things automated. If you’re championing a DevOps implementation in your organization, or wish to see where your current processes measure up against your peers, read on.

Blog Post

From the SQL Server Central Blogs - Tempdb Performance Improvements in SQL Server 2022 are Dramatic

SQLEspresso from SQLEspresso

Tempdb is always a topic for me whether it’s in my sessions or blogs I have written. However, I’ve never been so excited about it then I am when...

SQL Server 2022 Revealed

SQL Server 2022 Revealed: A Hybrid Data Platform Powered by Security, Performance, and Availability

Additional Articles from SQLServerCentral

Know how to use the new capabilities and cloud integrations in SQL Server 2022. This book covers the many innovative integrations with the Azure Cloud that make SQL Server 2022 the most cloud-connected edition ever. The book covers cutting-edge features such as the blockchain-based Ledger for creating a tamper-evident record of changes to data over time that you can rely on to be correct and reliable.

 

 Question of the Day

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

 

Query Store Space Usage in SQL Server 2022

I created a new database on a SQL Server 2022 instance. This database has had a high workload for the last month and it appears that the Query Store is using well over 100MB of space to store data in my database. This was created with all defaults and other DBAs say they haven't configured anything. What is going on?

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)

Enabling Accelerated Data Recovery

How do I enable Accelerated Data Recovery (ADR) in SQL Server 2022?

Answer: Just enable this with ALTER DATABASE

Explanation: This can be enabled with an ALTER DATABASE SET ACCELERATED_DATABASE_RECOVERY = ON. If you do this, the PVS is in the primary file group. You can also set up a specific filegroup and specify that in that commend. Ref: Enabling and Controlling ADR - https://learn.microsoft.com/en-us/sql/relational-databases/accelerated-database-recovery-management?view=sql-server-ver16

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 2016 - Development and T-SQL
Plan Handle exists but NO QUERY PLAN? - Is this a fully legit situation in the result of the below query to have Plan Handle but NO QUERY PLAN? SELECT * FROM ( SELECT DBName = DB_NAME(ps.database_id) , ObjectName = OBJECT_NAME(ps.object_id, ps.database_id) , cached_time = ps.cached_time , last_execution_time = ps.last_execution_time , last_elapsed_time_secs = ps.last_elapsed_time / 1000000.0 , execution_count = ps.execution_count , PlanHandle = […]
SQL Server 2019 - Administration
TempDB misconfiguration - Bit of a dilemma,  I accidentally entered the incorrect sizing of the tempdb files during the installation of a clustered instance. the installation completed but the tempdb partially created the files then ran out of space.  The issue is the SQL instal completes but failed on a few steps and now it will not start. […]
SQL Server 2019 - Development
Operating System Error on Bulk Insert - Hello everyone, it's my first post here, and I'm no expert on SQL, so I hope you're able to help, and will forgive my ignorance, I'm keen to learn! I'm trying to import around 100 txt files into a SQL table, for processing ahead of bringing into PowerBI. I've built a query, and a layout […]
Split field to top 4 - I need to split the column 'DiagnosisCodes' into 4 new columns 'Diagnosis1', 'Diagnosis2', 'Diagnosis3' and 'Diagnosis4' for the unique ChartProcedureId's. If they add more DiagnosisCodes, I only need the top 4. Any assistance is appreciated.
SQL Server 2008 - General
Is there a way to have SQL Server be aware of a new file? - Every weekday we receive a file which under normal circumstances gets processed by a SQL Job that runs on a schedule at 7 AM. It's worked this way for years. This file is produced by a partner, who uploads it to a secure FTP site. However, for the last several weeks the file has either […]
SQL Azure - Development
Reducing varchar(max) cols that are in auto generated indexes - Hi all, I inherited an app schema that is shared across 140+ different DBs [one for each client; they all have their own data but the schemas are otherwise exactly the same]. I am their tsql dev, and have been doing a lot of performance enhancements. One thing I'm running into is that one of […]
General Cloud Computing Questions
Azure SQL managed Instance tiers comparison - Hello everyone. I have an azure general purpose managed instance, 8vCore, 1Tb storage running. The average CPU usage is 50%, with 70-75% in peak hours. Now we have a new report that need almost real-time data and since the server is heavy used, the query get a lot of concurrrency with writes tasks. Noted that […]
What are the alternatives of S3 Object Lambda? - Hi all! AWS has a good example of how to manipulate the requested objects from S3 and it is S3 Object Lambda which can be placed as a middleware between Amazon S3 API Consumer and S3 bucket. What are the alternatives of that in Azure, GCP, Alibaba Cloud, Oracle Cloud, RedHat, VMWare, SalesForce, DigitalOcean, etc?
General
SQL Script plug-in - Is the SQL Script plug-in listed here no longer available? SQL Scripts in SSMS Is there any other plug-in that can be used to search SQLServerCentral scripts?
Integration Services
CozyRoc REST Connection and Source - Any CozyRoc REST connection users out there? I'm looking for an explanation of how to set up error handling for 400 and 404 errors so that the source component won't report an error for these but just move on. I'm using some in a loop, passing an item number as a parameter and if there […]
SQLServerCentral.com Website Issues
Warning prompt when writing a reply - When I wrote this reply https://www.sqlservercentral.com/forums/topic/sql-server-database-redunduncy#post-4148195 and pressed submit I got an error "Are you sure you want to do that?" I could be missing the obvious but I'm not sure why the website queried my post? Possibly it's looking at language and it thought my post had a negative tone to it? Unless I'm […]
SQL Server 2022 - Development
Best way to combine records across databases - Data which is distributed over multiple databases needs to be gathered and then queried/filtered. Currenttly a temporary table in which the records are inserted from the  different databases is used however it is really slow, is there a faster way to handle it?
SQL Server Database Redunduncy - I am having two databases A and B  Both are logging in Same DATA at the same interval of Time But in case of power failure system A it should copy missing data from system B and Vice Versa In case of power failure of System B it should copy the missing data from System […]
Return a set of rows between 2 values (multiple times) - Hello   I have a table, a (sample only shown) This has a set of ids in it   CREATE TABLE a (id int) INSERT INTO a (id) VALUES (1, 4, 8, 15)   I'm trying to create a set (table) that holds the id in column 1 (call it pid) and links all the […]
Update records using previous row and calculated value of current row. - Hi All, I am trying to update a table's column avg_gain based on previous avg_gain and current gain column for RSI calculation. I was able to implement this logic through cursor but it is time consuming, so was trying to see if there are other techniques to achieve it for having performance gains; The Formula […]
 

 

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

 

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