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

Can You Let Go of Determinism

Why do we reboot machines when something goes wrong?

I'm sure all have done it, and I would guess quite a few of you have found situations where this seems to fix issues, but there isn't an underlying root cause that you can pinpoint.  This is a fairly accepted way of dealing with issues, but have you thought about why this is a way to solve some problems?

The main thing that a reboot does is return the system to a know starting state. It's why quite a few people complain about some modern laptops and mobile devices because they avoid restarts and try to sleep/wake instead. Most software expects to work on a stateless machine, so restarts help find a known good state.

Coincidentally, this is why databases are so hard for many people, especially software developers. Databases are state machines, which are inherently more complex than stateless ones. However, that's not the thing I want to discuss.

If you think about code you've written and problems solved, which datatypes cause the most headaches and challenges? Which types of data are most difficult to deal with? There might be a variety of answers, but one of the most common ones is datetime data. The main reason? It's not deterministic in many cases when we deal with calculations in real time. This data ages poorly and it's hard to even test. By the time we've restored data from production, invariably our test data is old. We can de-age it (make it newer), but still, testing this data based on what happened yesterday is often hard.

This has been on my mind as another modern technology has similar characteristics. AI LLMs are often not deterministic. The same prompt might not produce the same response, and like SQL Server execution plans, even small changes in the input can affect the output.

That can be maddening to many of us, as we often want a reproduction of a problem to solve it. I ask for this from clients, Microsoft asks for it when I send them an issue, and most software developers want to be able to reproduce a problem on their machine. Or they often struggle to fix a bug.

In this new AI world, is determinism something most of us can hold loosely? It's a good question as many of us struggle with AI when we don't get the response we expect, or even a good response. Worse, we might get varying levels of quality code back from the same models. I have found that an experiment I conduct sometimes cannot be reproduced with any accuracy.

And sometimes it works the exact same way the second and third times I conduct it.

Humans are not deterministic. Many of us know someone that is very reliable and can predict how they react most of the most. Most, however, isn't a characteristic of determinism. I guess in that sense, humans are a state machine as well, constantly evolving and different.

I find that success with modern AI LLMs requires me to accept some level of determinism and flow with it. I need to not expect the results to be perfect, and either massage the way I express the problem or give up. I've written it before, but I think learning when to give up on an LLM and just do the work yourself is a key skill for technologists.

Maybe for anyone using LLMs.

So, as you think about the future, are you prepared for one without determinism?

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Real-time On-prem SQL Server Data in Excel – Over the Internet

Cláudio Tereso from SQLServerCentral

Learn how you can combine Power BI and Excel to share data from your local SQL Server across the Internet to Excel on a client machine.

External Article

Microsoft Fabric and MQTT for Real-Time IoT Data Ingestion and Analytics

Additional Articles from MSSQLTips.com

Microsoft Fabric is a unified platform for data integration, data engineering, real-time intelligence, and advanced analytics. Fabric is known for providing an integrated way of working with your data, connecting to many diverse types of sources and across the data landscape. How do we get started ingesting and analyzing real-time data streamed over the MQTT protocol?

Blog Post

From the SQL Server Central Blogs - Git forked

Randolph West from Born SQL with Randolph West

Forgive me for the title. Mentally I’m 12. When I started my current day job, I certainly didn’t expect to write this many blog posts about Git. I don’t...

Blog Post

From the SQL Server Central Blogs - Fabric Cost Analysis (FCA)

James Serra from James Serra's Blog

Monitoring costs in Microsoft Fabric can be trickier than it first appears. You might assume it’s just a flat fee per capacity (easy, right?), but real-world usage tends to...

Fundamentals of Data Engineering: Plan and Build Robust Data Systems

Site Owners from SQLServerCentral

Data engineering has grown rapidly in the past decade, leaving many software engineers, data scientists, and analysts looking for a comprehensive view of this practice. With this practical book, you'll learn how to plan and build systems to serve the needs of your organization and customers by evaluating the best technologies available through the framework of the data engineering lifecycle.

 

 Question of the Day

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

 

Lots of FKs

In SQL Server 2025, what are the most outgoing and incoming FK references a table can have?

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)

Missing the Jaro Winkler Distance

I upgraded a SQL Server 2019 instance to SQL Server 2025. I wanted to test the fuzzy string search functions. I run this code:

SELECT JARO_WINKLER_DISTANCE('tim', 'tom')

I get this error message:

Msg 195, Level 15, State 10, Line 1
'JARO_WINKLER_DISTANCE' is not a recognized built-in function name.

What is wrong?

Answer: The Database Scoped Configuration for Preview_Features is set to OFF

Explanation: The Database Scoped Configuration needs to be enabled with this code:

ALTER DATABASE SCOPED CONFIGURATION SET preview_features = ON

Even with a compatibility level of 150, this function will run if preview features are enabled. Ref: JARO_WINKLER_DISTANCE - https://learn.microsoft.com/en-us/sql/t-sql/functions/jaro-winkler-distance-transact-sql?view=sql-server-ver17

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 - Development
Which 'Where' statement conditional upon a variable - Thanks in advance for any clues on this. I am trying to write a 'conditional where' statement in a typical select statement. Early in the stored procedure the variable @Type is set to either 'AB or 'CD'. I'm trying to have my WHERE be dependent on that variable e.g.: WHEN @Type = 'AB' my "WHERE" […]
SQL Azure - Administration
Transactional Replication setup issue - Hi! I've been banging my head against the wall for 2 days now trying to setup Transactional Replication between an Managed Instance and Azure SQL Database. Documentation: https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/replication-two-instances-and-sql-server-configure-tutorial?view=azuresql That's the documentation I'm working with although I'm using the same instance for distribution and publishing. I've double checked the config on Azure and replication multiple times […]
Integration Services
Foreach Loop still executes after process and delete all the folders - I have two challenges XML source control not displaying the XML file parent node columns even though it is showing in the XSD file. Is there any solution to get the XML parent nodes columns in the XML source component. Foreach loop container control not stopping. it still executes if more than two files in […]
Editorials
Microsoft Security Changes and SQL Server - Comments posted to this topic are about the item Microsoft Security Changes and SQL Server
Expanding into Print - Comments posted to this topic are about the item Expanding into Print
The Power of Data and Privacy - Comments posted to this topic are about the item The Power of Data and Privacy
The DBA is Dead; Long Live the DBA - Comments posted to this topic are about the item The DBA is Dead; Long Live the DBA
Discussions about Books
Data Warehouse Toolkit meets Star Schema: The Complete Reference - Is there a good syllabus for reading these two together? (Yes, it's called the table of contents!) Just wondering because Kimball's book is super high level, and Adamson's book is much more detailed. Maybe I'll just have to put it all in my book report. LOL
Article Discussions by Author
Backup to Immutable Storage - Comments posted to this topic are about the item Backup to Immutable Storage
Downtime Caused by the Postgres Transaction ID Wraparound Problem - Comments posted to this topic are about the item Downtime Caused by the Postgres Transaction ID Wraparound Problem
The String Distance I - Comments posted to this topic are about the item The String Distance I
What's the Date? - Comments posted to this topic are about the item What's the Date?
Two New Shortcuts for Fabric Lakehouse Developers: The Fabric Modern Data Platform - Comments posted to this topic are about the item Two New Shortcuts for Fabric Lakehouse Developers: The Fabric Modern Data Platform
GPX distance and time analysis in SQL Server - Comments posted to this topic are about the item GPX distance and time analysis in SQL Server
SQL Server 2022 - Administration
SSMS 22 Latest Update Crashing - Hi all, I've just had to roll back my SSMS 22 version from 22.3.0, because this version seems to crash as soon as I open it (just after selecting an instance to connect to). Anyone else having any issues with 22.3.0?
 

 

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

 

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