Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

CTE and UNION performance issue

$
0
0
I am optimizing an inline table-valued function that performs calculations by heavily using OVER, LEAD and LAG. At one stage, records are doubled by performing a UNION. My statement can be schematized as:
WITH
    Q1

Viewing all articles
Browse latest Browse all 3145

Trending Articles