math

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

Blogs

SQL Prompt Quick Access to Helper Code

By

We’ve been doing some events as part of the Redgate Roadshow, and at one...

Eleven chapters of my data architecture book are available

By

As I have mentioned in prior blog posts, I have been writing a data...

Speaking at SQL Saturday Boston 2023

By

I’m happy to announce that I will be speaking at SQL Saturday Boston on...

Read the latest Blogs

Forums

I can query one by one. Need help how to become Single Query

By Adelia

Hi, This is my table and data, CREATE TABLE [dbo].[rpt_AR_StatementOfAcct_003]( [Id] [int] IDENTITY(1,1) NOT...

Baking up and restores VLDBs

By ericwenger1

Some of our databases are getting be close to 2 terabytes. We are backing...

Data Analysis with Python: Calculating Mean and Median

By Piyushbhatt

I'm working on a data analysis project in Python and need to calculate both...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers