Linked Questions

11 votes
2 answers
3k views

Is support for Parallel Scalar UDF a reasonable feature request?

It is fairly well documented that scalar UDF's force an overall serial plan. Running functions in parallel Given a large number of rows coming into a point in the pipeline where a UDF must be ...
crokusek's user avatar
  • 2,120
5 votes
5 answers
7k views

Creating a Persisted Computed Column with a function

I am working with the programmers on a database solution. They want to add a computed column to mimic the old keys for the older queries, procedures, and systems and index it. The new keys will be ...
Jersey's user avatar
  • 99
8 votes
2 answers
9k views

Referencing another table from a computed column

I am working on a project where many of the entities in the data model do not have a name column, but instead the "name" needs to be constructed from a concatenation of multiple columns. Initially I ...
DanO's user avatar
  • 181
1 vote
4 answers
9k views

Sql Max value from multiple columns in Computed Column

In this article solution 1, it talks about finding the maximum value from many columns. I would like to conduct this in a computed/persisted column. How would I do this? https://www.mssqltips.com/...
user avatar
1 vote
3 answers
1k views

SQL Server not creating parallel plan with OPTION(MAXDOP 20)

We have a UAT3 server hosted on VM with 8 sockets and 20 processer, we have similar UAT2 server hosted on the same VM with same configuration. We are running a below query on both the server select ...
pradeep singh's user avatar
-1 votes
1 answer
7k views

How to check if a start and end date interval is within the range of another start and end date interval

As the title says, I need to check if a start and end date period is within the range of another start and end date period. I don't know if this needs to be done in a trigger or a stored procedure. ...
Yum's user avatar
  • 1
1 vote
3 answers
207 views

Alter a scalar UDF that is used in a check constraint in SQL Server 2012

I have a check constraint on a column that uses a scalar UDF. I have a requirement where I need to make changes to the UDF. Based on what I know, I need to drop the constraint, make changes to the UDF,...
RobMartin's user avatar
  • 149
1 vote
2 answers
2k views

Full Outer Joins Slowing Down Query

I am relatively new to SQL, so I apologize if I ask some basic questions. Our database is setup on Azure, we have automatic indexes turned on. The query I have takes about 6 seconds and gets 2217 ...
DalTron's user avatar
  • 111
-3 votes
1 answer
420 views

Get datetime based on change in another column using UDF and computed column in TSQL [closed]

Given: Given a Microsoft SQL database table Log with multiple columns including these important ones: id (primary key), code (an integer that can take multiple values representing status changes), ...
Cogicero's user avatar
1 vote
0 answers
80 views

Optimising filter with dynamic computed column

I need to implement user risk scoring in model The user risk scoring must compile dynamically on changes (eg: profile, transaction) - meaning for any changes on profile or any incoming transaction, ...
c448548's user avatar
  • 375