Statistics and the Ascending Key Problem
I’ve mentioned previously how not having up to date statistics can cause problems in query performance. This post looks at something called the Ascending Key Problem which can badly...
2021-02-09
177 reads
I’ve mentioned previously how not having up to date statistics can cause problems in query performance. This post looks at something called the Ascending Key Problem which can badly...
2021-02-09
177 reads
Statistics are vitally important in allowing SQL Server to find the most efficient way to execute your queries. In this post we learn more about them, what they are...
2021-03-24 (first published: 2021-02-01)
397 reads
When you don't have statistics, what does SQL use to calculate the estimated number of rows?
2021-02-04 (first published: 2021-01-26)
292 reads
Statistics objects are important for allowing the SQL Server Optimizer to make good estimates and form efficient execution plans. Related to that it's useful for us to understand when...
2021-01-25 (first published: 2021-01-18)
496 reads
Query Store is a configuration that is enabled per database, and the plans and stats for queries executed in that database are stored in the database itself. So what...
2021-01-18 (first published: 2021-01-11)
468 reads
Script to identify the most expensive queries on your database server using the Query Store DMVs. This allows you to look at data from a specific time frame, as...
2021-01-11 (first published: 2021-01-04)
691 reads
Here's a SQL Puzzle for the festive period. 2020 has been a year of many things but amongst it all, it has been the year of chess. The combined...
2020-12-24 (first published: 2020-12-15)
531 reads
Introduced with SQL 2016, Query Store was, probably without doubt, the most anticipated and talked out new feature. In this post we'll just take a brief look at it,...
2020-12-21 (first published: 2020-12-14)
925 reads
Recently Microsoft quietly let us know that TDE (Transparent Data Encryption) will be available in the Standard Edition of SQL Server 2019. If you don’t follow SQL topics on...
2019-11-12 (first published: 2019-11-05)
7,108 reads
No, the answer isn’t because you’re a DBA. This isn’t a technical post about databases, but rather a discussion of a statistical paradox that I read about recently. Statistics...
2019-10-01
35 reads
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
At work we've been getting better at writing what's known as GitHub Actions (workflows,...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers