Arithmetic

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,388 reads

Blogs

2025 Wrapped for Steve

By

I’ve often done some analysis of my year in different ways. Last year I...

The Book of Redgate: Spread across the world

By

This was Redgate in 2010, spread across the globe. First the EU/US Here’s Asia...

Merry Christmas

By

Today is Christmas and while I do not expect anybody to actual be reading...

Read the latest Blogs

Forums

Finding Motivation

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Finding Motivation

The Last Binary Value of the Year

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Last Binary Value of...

SQL Art, Part 2: New Year Fireworks in SSMS

By tedo

Comments posted to this topic are about the item SQL Art, Part 2: New...

Visit the forum

Question of the Day

The Last Binary Value of the Year

What does this code return?

SELECT cast(0x2025 AS NVARCHAR(20))
Image 1: Image 2: Image 3: Image 4:

See possible answers