Aggregates

External Article

Eager Aggregation in SQL queries

  • Article

Aggregation is a widely used way to summarize the content of a database. It is usually expressed with GROUP BY clause or just using aggregate functions (like COUNT or SUM). When the database engine executes a query with aggregations, it produces individual rows need to compute the required output and then performs the aggregation as (almost) last step. We discuss in this article how to re-write a query manually so that the order of operations will be different and when it can be beneficial.

2024-01-15

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.

5 (3)

You rated this post out of 5. Change rating

2021-05-07 (first published: )

5,340 reads

Blogs

Announcements from the Microsoft Fabric Community Conference

By

(Shameless plug: The price of my book “Deciphering Data Architectures: Choosing Between a Modern...

The Basics of TRY CATCH Blocks–#SQLNewBlogger

By

I was working with a customer and discussing how to do error handling. This...

Working with ALS – Insights from the Ability Summit

By

The 14th annual Ability Summit is a global event that I attended a few...

Read the latest Blogs

Forums

Using data returned from sql

By kelly.fergus@gmail.com

Ok, I've come up with another problem in my project. I am happily pulling...

Deadlock problem with upsert

By Kavada

Hello people, I am an SQL beginner and I have a problem with the...

SSIS in Visual Studio File and Folder Structure

By cpiacente

Hello, I had an oddball question I was hoping someone could point me in...

Visit the forum

Question of the Day

Backing up the Resource Database

How does the Resource database in SQL Server 2022 get backed up?

See possible answers