I was the host this month for T-SQL Tuesday #147 and here is a look at the people who blogged (that I know about). If I’ve missed anyone, let me know.
Click through for a summary.
Comments closedA Fine Slice Of SQL Server
I was the host this month for T-SQL Tuesday #147 and here is a look at the people who blogged (that I know about). If I’ve missed anyone, let me know.
Click through for a summary.
Comments closedGianluca Sartori continues a series on XESmartTarget:
In the previous recipe, we wrote event data to a table in the database and each event used field and action names to map to the column names in the table. The same information (the text of the command) was stored in two separate columns, depending on the event type:
– batch_text for sql_batch_completed events
– statement for rpc_completed events
SSMS has a nice feature that allows you to create a merged column using data from several columns. Here is how you do it:
Click through for that explanation.
Comments closedChad Callihan shows proof of authenticity:
We’ll use MySQL Workbench for this example. Feel free to grab the latest version from over here.
Let’s open up Workbench and click the plus sign next to MySQL Connections to create a new MySQL Connection:
Read on to see how it all works.
Comments closedAnthony Nocentino has the need for speed. And authentication:
At work, I get to work with some fantastic tech that pushes the boundaries of performance. I needed to do some performance testing from a Windows server into a FlashBlade using s3. I reached out to a colleague of mine, Joshua Robinson, who told me about s5cmd.
s5cmdis a very fast, parallel s3 compatible command-line client.Check out Joshua’s post for some performance numbers. Here’s a direct quote from his post.
But it doesn’t matter how fast it is if you can’t connect, so Anthony shows us how to do just that.
Comments closedThis post is not about a specific SQL Server object but instead outlines a technique used in various locations to reduce contention while still providing thread synchronization. There are hundreds of locations throughout the SQL Server code base that must account for multi-threaded access. A common technique used in multi-threaded coding is a reader, writer lock.
The idea behind a reader, writer synchronization object is to allow reader parallelization in conjunction with writer synchronization. Let’s look at a simple pattern of a single path synchronization object. (Example: spinlock)
Click through for a bit of pseudo-code and explanation.
Comments closedI take a look at some basic KQL statements:
In order to query data, we need to use the Kusto Query Language, KQL. If you’re familiar with Splunk’s language, KQL is pretty similar. It’s just enough like SQL that it feels like you should understand it but not SQL-like enough that you’ll actually have an intuitive understanding of the language.
One quick note is that all KQL statements are case-sensitive. I personally consider this a mistake in a query language, but they didn’t ask me, I suppose. With that said, let’s get digging.
Seriously, case sensitivity in programming languages is an annoyance at best.
Comments closedErik Darling hits one of my favorite topics:
The first rule of rewrites is that they have to produce the same results, of course. Logical equivalency is tough.
In today and tomorrow’s posts I’m going to compare a couple different scenarios to get the top value.
There are additional ways to rewrite queries like this, of course, but I’m going to show you the most common anti-pattern I see, and the most common solution that tends to work better.
Click through to see when each works better.
Comments closedKendra Little has a guide for us:
We’ve recently updated the SQL Server and Azure SQL index architecture and design guide. This article is an in-depth guide to indexing in databases using the SQL Server engine, including SQL Server, Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics.
Our recent update adds a table to categorize the types of indexes discussed in the article, clarifies B-trees vs B+ trees, and describes how row locators (aka “secret columns”) are used in nonclustered indexes.
Read on for more information and do check out the guide.
Comments closedGianluca Sartori continues a series on XESmartTarget:
The first approach is extremely painful (XML shredding – enough said).
The second approach requires a file target, which is not always available. It also requires to stop the session to read all the data, or write extremely complicated code to read the data incrementally while the session is running (believe me, I did it and my brain still hurts).
This is where XESmartTarget jumps in to help you! All you have to do is write some configuration in a json file and let XESmartTarget do its magic.
Read on to see how XESmartTarget can help you write Extended Events output to a table without the pain.
Comments closedI am planning on TDE encrypting a bunch of large SQL Server databases. Due to potential IO contention issues during the work day , the plan is to encrypt these databases during the out of hrs period. If the encryption is triggered , but there is a SQL Server service restart during the encryption process , will the encryption process be impacted when the SQL Server service restarts?
Click through to see what happens.
Comments closed