Advanced SQL

SQLServerCentral Article

SQL Window Functions Series: NTILE()

  • Article

Unlock the power of SQL's NTILE function with our latest deep-dive article. Learn to segment your data effectively into quantiles for more nuanced analysis, discover common pitfalls and their solutions, and optimize your queries for peak performance.

4.67 (3)

You rated this post out of 5. Change rating

2024-02-03 (first published: )

3,778 reads

SQLServerCentral Article

5 (4)

You rated this post out of 5. Change rating

2023-11-20 (first published: )

4,233 reads

SQLServerCentral Article

Exploring Parameter Sensitive Plan Optimization in SQL Server 2022

  • Article

PSPO (Parameter Sensitive Plan Optimization) is a SQL Server feature that improves query performance by accepting varied data sizes based on the runtime parameter value(s) specified by the customer. It deals with the situation in which a single cached plan for a parameterized query isn't the best option for all potential incoming parameter values. Non-uniform data distributions exhibit this phenomenon. When using PSPO, SQL Server keeps several execution plans for a single query, each one customized for a particular parameter value. With the help of this feature, numerous execution plans for a parameterized query are generated, each of which is tailored for a certain range of parameter values.

You rated this post out of 5. Change rating

2023-07-21

2,503 reads

SQLServerCentral Article

4.9 (10)

You rated this post out of 5. Change rating

2022-07-13

24,020 reads

Technical Article

Create a Tally Function (fnTally)

  • Script

Many people have published high performance, read-less, Inline Table Valued functions that use Itzik Ben-Gan's wonderful "Virtual Numbers Table" to replace WHILE loops and other forms of RBAR. This one is Jeff Moden's version.

4.86 (7)

You rated this post out of 5. Change rating

2019-08-13 (first published: )

6,210 reads

Stairway to Advanced T-SQL

Stairway to Advanced T-SQL Level 3: Understanding Common Table Expressions (CTEs)

  • Stairway Step

A CTE is a temporary result set defined by a simple query, and is used within the execution scope of a single INSERT, UPDATE, DELETE, or SELECT statement. In this article we will explore how to define and use CTE's.

You rated this post out of 5. Change rating

2024-04-03 (first published: )

5,894 reads

Blogs

What to Know about Power BI Theme Colors

By

Power BI reports have a theme that specifies the default colors, fonts, and visual...

A Global Team Meeting

By

The last few years at Redgate we’ve had the entire (or most) of the...

A New Word: sayfish

By

sayfish – n. a sincere emotion that seems to wither into mush as soon...

Read the latest Blogs

Forums

Script

By ramana3327

We have about 30 databases in server A.  All of them need to migrate...

Add alarms to database when a query, stored procedure, SSIS package hangs

By Lord Slaagh

Hello SSC, I am a SQL Server developer that has some DBA skills. I...

Visit the forum

Question of the Day

The Secondary Database Name in an AG

I am setting up a SQL Server 2022 Availability Group and I am ready to restore the database on the secondary. The primary database is named Finance. However, we also use this instance for QA and already have a database named Finance. How do I configure the AG to use a different database as the secondary?

See possible answers