Tag Archives for " function "

Mar 07

Should I Replace My FOR XML PATH String Merges with String_agg?

By Jeffry Schwartz | Function , Performance Tuning , Query Tuning , SQL Development , SQL Server

If you are looking for major performance gains, the answer is no.  However, if you are using SQL Server 2017 and developing new code, you should consider using the new String_agg function that is available on SQL Server 2017 because code that uses this function is so much more readable and easier to write and […]

Continue reading
Aug 23

Using sys.sql_expression_dependencies as a Single Source to Find Referenced and Referencing Objects

By Lori Brown | Dependencies , Object Information , SQL Administration , SQL Development , SQL Server

I thought I would continue to expand on ways to view dependencies.  This post will give you an alternate way to find things referencing tables and finding things that are referenced by a stored procedure or view after my previous posts on the subject.  See these (https://www.sqlrx.com/finding_things_sql_that_reference_a_table/ & https://www.sqlrx.com/how-to-find-the-objects-and-columns-a-stored-procedure-or-view-uses/ ) A different way to find […]

Continue reading
Jan 19

Find Currently Executing Jobs Running Longer Than 30 Day Average

By Lori Brown | Helpful Scripts , Intermediate , SQL Administration , SQL Server

–By Lori Brown   @SQLSupahStah I needed to update some of our long running job monitoring code to improve it from the version that we have right now. I like this version because it uses msdb.dbo.syssessions (https://msdn.microsoft.com/en-us/library/ms175016.aspx) to validate that a job is actually running. I also wanted to know the percent difference between the current […]

Continue reading
>