Posts by Jeremiah Peschka

Announcing sp_BlitzCache v2.5.0

SQL Server
14 Comments
Woohoo, it’s another half of the year which means it’s time for another version of sp_BlitzCache®. The last version came out on June 18th, and it’s been about 4 months. In that time frame, you have requested some new features, and they’ve slowly trickled into sp_BlitzCache®. If you don’t want to wait, head over to the download…
Read More

In Review: SQL Server 2005 Waits and Queues

Wait Stats
7 Comments
Back in November of 2006, Microsoft released “SQL Server 2005 Waits and Queues” as a best practices article. Many people in the SQL Server community have referenced this article as a great place to get started with understanding waits in SQL Server. Heck, I’ve recommend it on a regular basis. The last time I recommended…
Read More

Getting Started with Diskspd

SQL Server
62 Comments
Diskspeed, or diskspd.exe, is Microsoft’s replacement for SQLIO. While I’m not going to replace our SQLIO tutorial, you can use the information in here to replicate the same type of tests on your systems to get the information you need. During the Dell DBA Days, Doug and I used diskspd as one of our techniques…
Read More

Enabling Query Store in Azure SQL Database

Enter Query Store Query Store, in short, is a way to track query performance over time. In Microsoft’s words, “The feature automatically captures a history of queries, plans, and runtime statistics, and retains these for your review”. It’s like sys.dm_exec_query_stats but it persists across reboots! And it has execution plans! The Query Store is a…
Read More

Getting JSON out of SQL Server

SQL Server
20 Comments
SQL Server 2016 brings support for JSON. For those of you who don’t know, JSON is JavaScript Object Notation – it’s a way of representing application level objects as a string. Imagine XML without anywhere near as much line noise, and you’re pretty much there. Our Sample Document In this example, to retrieve orders and…
Read More

Finches and Job Roles

SQL Server
14 Comments
Developers – how much operations work are you doing? DBAs – how much development do you do? The Separation of Duties For most of us, we stick to our assigned job role. Developers write code and then throw it over the wall for the ops team to put in place. If there’s a problem, there…
Read More

SQL Server Version Detection

SQL Server
22 Comments
Every now and then, you need to figure out which version of SQL Server you’re using without knowing in advance. This might happen in a script (like sp_BlitzCache) or you might be using it in a migration. Getting the SQL Server Version with @@VERSION THe first thing that comes to mind is @@VERSION. On my…
Read More

Identity Columns in Oracle

Oracle
6 Comments
Many databases have the ability to create automatically incremented numbers. In SQL Server, we can use an IDENTITY property on a column to get autoincrementing numbers. But what can do we in Oracle? Sequences Sequences work in all recent versions and editions of Oracle. The default way to do this is pretty simple: Transact-SQL CREATE…
Read More

Which Tables are Being Used in Oracle?

Oracle
8 Comments
When we’re making changes to a database, it’s important to know which tables and indexes are in use. If we don’t need an index, maybe we can drop it. If nobody is using a table, do we still need it? We can find out which tables and indexes are in use through two different mechanisms.…
Read More

SQL Server Common Table Expressions

SQL Server
39 Comments
Common table expressions are a feature of SQL that lets a developer create a query that can be referenced multiple times. This feature gives developers another tool to add flexibility or just to simplify code. Why Common Table Expression? Why is it called a Common Table Expression (CTE)? Because that’s what the documentation calls it!…
Read More