T-SQL

SQLServerCentral Article

Performance Tuning with SQLFacts Tools

  • Article

The need for performance tuning your SQL Server workloads has never been more critical. As workloads are moved into cloud services, their efficiency has a direct impact on the recurring bills. A workload that consumes more resources than necessary costs more to host in the cloud and affects the bottom line for your organization.

5 (3)

You rated this post out of 5. Change rating

2023-04-07

10,370 reads

External Article

DAX CASE Statement Functionality with IF, SWITCH and SWITCH True

  • Article

The CASE expression is one of the most valuable tools in your T-SQL toolbox. I use it in almost every query I write. However, there isn't a direct equivalent of CASE in DAX. Since it's a different language entirely, I don't expect it. As my grandmother used to say, I am not surprised, just disappointed. If you don't know, DAX (Data Analysis Expressions) is a language for creating custom calculations and aggregations in Power Pivot, Power BI, and other data analysis tools. Two functions in DAX come close to replicating the functionality but come with limitations. Which one of these functions should you use? Please stay tuned.

2023-04-03

SQLServerCentral Article

ChatGPT in SQL Server - Practical examples

  • Article

Introduction ChatGPT in SQL Server In this article, we will learn some basic examples of ChatGPT in SQL Server. In a previous article, we had an interview with ChatGPT an AI chatbot developed by OpenAI. If you do not know how to use it yet, you can go to that article. We will show some […]

5 (8)

You rated this post out of 5. Change rating

2023-03-06

46,611 reads

Blogs

Data-driven vs. Data-informed: Let’s Acknowledge the Truth

By

This comic was retweeted into my timeline on Twitter (I refuse to call it...

Writing Parquet Files – #SQLNewBlogger

By

Recently I’ve been looking at archiving some data at SQL Saturday, possibly querying it,...

A word about IT/cybersecurity and mental health

By

Just as it's important to take care of our physical health (and I'm guilty...

Read the latest Blogs

Forums

Can you connect Power Apps to SQL Server if you work in the government?

By JJ B

My agency has been using the combo of on-premises SQL Server for the back...

Unable to connect to SQL 2019 using Pyodbc

By yyang5823

Development Environment I am learning how to use pyodbc and accessing database in SQL...

Multiple deadlocks occurring with contentious code

By zoggling

We are seeing multiple frequent deadlocks occurring with the following extract of code, which...

Visit the forum

Question of the Day

Multiple Query Trace Flags

I want to enable two trace flags, 4199 and 4137, for a single query. How should I do this:

-- A
SELECT
  a.AddressID
, a.AddressLine1
, a.AddressLine2
, a.City
, a.StateProvinceID
, a.PostalCode
, p.FirstName
, p.LastName
FROM
  Person.Address a
  INNER JOIN person.Person AS p
    ON p.rowguid = a.rowguid
WHERE
  City           = 'SEATTLE'
  AND PostalCode = 98104
OPTION (QUERYTRACEON 4199, 4137);

-- B
SELECT
  a.AddressID
, a.AddressLine1
, a.AddressLine2
, a.City
, a.StateProvinceID
, a.PostalCode
, p.FirstName
, p.LastName
FROM
  Person.Address a
  INNER JOIN person.Person AS p
    ON p.rowguid = a.rowguid
WHERE
  City           = 'SEATTLE'
  AND PostalCode = 98104
OPTION (QUERYTRACEON 4199, QUERYTRACEON 4137);

-- C
SELECT
  a.AddressID
, a.AddressLine1
, a.AddressLine2
, a.City
, a.StateProvinceID
, a.PostalCode
, p.FirstName
, p.LastName
FROM
  Person.Address a
  INNER JOIN person.Person AS p
    ON p.rowguid = a.rowguid
WHERE
  City           = 'SEATTLE'
  AND PostalCode = 98104
OPTION (QUERYTRACEON 4199), (QUERYTRACEON 4137);

See possible answers