Jonathan Roberts


Technical Article

Comprehensive SQL Performance Monitoring and Optimisation Script

This script monitors and reports the execution statistics of SQL statements over a specified period, capturing metrics such as execution counts, CPU time, I/O operations, and elapsed time. It provides a comprehensive view of query performance, aiding in the diagnosis of performance issues and identifying problematic SQL queries in the database.

5 (1)

You rated this post out of 5. Change rating

2024-07-29 (first published: )

973 reads

Technical Article

User-Created GENERATE_SERIES() Function for Older SQL Server Versions

In the world of SQL Server, adaptation is key. While the built-in GENERATE_SERIES() function was a valuable addition in SQL Server 2022, its absence in older versions created a functionality gap. Enter the user-written GENERATE_SERIES function. Adapted from Jeff Moden's "dbo.fnTally", it offers an efficient means to generate a series of numbers within a defined range in older SQL Server versions. Its design mirrors the built-in function in SQL Server 2022, making the transition between versions as simple as removing the dbo. prefix. This forward-thinking design reflects the ingenuity of the SQL Server community, ensuring a seamless, efficient database migration experience.

You rated this post out of 5. Change rating

2023-06-26 (first published: )

1,565 reads

Technical Article

A DateRange Table Valued function

The function is an inline table-valued function (or sometimes called a parameterised view) so it can be used just like a view or a table but needs parameters. It generates a single-column table of datetime2 with rows differing by any multiple of any of the dateparts that SQL Server provides.

5 (6)

You rated this post out of 5. Change rating

2019-08-29 (first published: )

5,016 reads

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

Impact of adding the opening of the Master Key in a SQL job for SSIS packages

By abdalah.mehdoini

Bonjour à tous, J'ai un problème d'exécution de mes packages SSIS. A chaque opération...

Being an extroverted introvert at a conference

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Being an extroverted introvert at...

Need to group the same valued ID fields to run an aggregate average over them

By Zososql

I have data that contains poll results, with the poll_id consistuting a single row...

Visit the forum

Question of the Day

How are statistics stored?

How are the statistics for query optimization stored in SQL Server?

See possible answers