aggregate function

SQLServerCentral Article

Optimize Your SQL by Reformulating the Spec

  • Article

As SQL developers, we tend to think of performance tuning in terms of crafting the best table indices, avoiding scalar and table valued functions, and analyzing query plans (among other things). But sometimes going back to the spec and applying some properties of elementary math can be the best way to begin to improve performance of SQL queries which implement mathematical formulas. This article is a case study of how I used this technique to optimize my SQL implementation of the Inverse Simpson Index.

(3)

You rated this post out of 5. Change rating

2021-05-07 (first published: )

5,392 reads

Blogs

Claude Code Helps Analyze Test Data Manager Log Files

By

I had a customer ask about analyzing their Test Data Manager (TDM) usage to...

PowerPoint to HTML with Claude AI

By

I had an idea for an animated view of a sales tool, and started...

Don’t Miss Out – SQL Server Query Tuning Fundamentals Starts Next Monday!

By

Next Monday, February 9, 2026, my one-day live online training SQL Server Query Tuning...

Read the latest Blogs

Forums

Is it uncommon for Dev's to have a data model of the source data

By Coffee_&_SQL

This is a generic question. To the moderators, I wasn't sure where to place...

ROLLUP to calculate Month total for all Categories

By Reh23

Good Afternoon, I have built a table with four columns:  Period(Month), Category, Numerator, Denominator....

Visit the forum

Question of the Day

Creating JSON I

On SQL Server 2025, what happens when I run this code:

SELECT JSON_OBJECTAGG( 'City':'Denver')
GO

See possible answers