<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/t-sql-tuesday-roundup-you-know-a-query-s-gonna-be-bad-when--bga9ihrqg" -->

---
title: T-SQL Tuesday Roundup: You Know A Query’s Gonna Be Bad When…
description: A roundup of T-SQL Tuesday #200 where community contributors shared their red flags for spotting bad SQL queries. Warning signs covered include WHILE loops and...
canonical: https://daily.dev/posts/t-sql-tuesday-roundup-you-know-a-query-s-gonna-be-bad-when--bga9ihrqg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: T-SQL Tuesday Roundup: You Know A Query’s Gonna Be Bad When… | daily.dev
og:description: A roundup of T-SQL Tuesday #200 where community contributors shared their red flags for spotting bad SQL queries. Warning signs covered include WHILE loops and...
og:url: https://daily.dev/posts/t-sql-tuesday-roundup-you-know-a-query-s-gonna-be-bad-when--bga9ihrqg
og:image: https://api.daily.dev/og/posts/Bga9IHrQg.png
og:image:alt: T-SQL Tuesday Roundup: You Know A Query’s Gonna Be Bad When…
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# T-SQL Tuesday Roundup: You Know A Query’s Gonna Be Bad When…

**[Brent Ozar](https://daily.dev/sources/brentozar)** · 7 min read · 0 upvotes · 0 comments

## Summary

A roundup of T-SQL Tuesday #200 where community contributors shared their red flags for spotting bad SQL queries. Warning signs covered include WHILE loops and CURSORs, scalar UDFs in WHERE clauses, DISTINCT with multiple JOINs, old-style comma-delimited join syntax, excessively long queries, CROSS JOINs, RIGHT OUTER JOINs, leading wildcards in LIKE searches, implicit conversions, hard-coded config values, lack of comments, and late filtering on large datasets. The post aggregates perspectives from over 20 SQL Server community bloggers.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.brentozar.com/archive/2026/07/t-sql-tuesday-roundup-you-know-a-querys-gonna-be-bad-when>

## Similar posts on daily.dev

- [I Know a Query’s Gonna Be Bad When… \#TSQL2sday](https://daily.dev/posts/i-know-a-query-s-gonna-be-bad-when-tsql2sday-ngvz4dujq) · Brent Ozar · 0 upvotes · 0 comments
- [Beautiful T-SQL Queries: Three Could Delete the Company](https://daily.dev/posts/beautiful-t-sql-queries-three-could-delete-the-company-ni51yxeeb) · SQL Authority · 36 upvotes · 7 comments
- [SQL Has Rules You Don’t Notice Until Your Query Is Wrong](https://daily.dev/posts/sql-has-rules-you-don-t-notice-until-your-query-is-wrong-ue7ucmkyu) · Medium · 0 upvotes · 0 comments

---

Tags: [#microsoft-sql-server](https://daily.dev/tags/microsoft-sql-server)

[View this post on daily.dev](https://daily.dev/posts/t-sql-tuesday-roundup-you-know-a-query-s-gonna-be-bad-when--bga9ihrqg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"T-SQL Tuesday Roundup: You Know A Query’s Gonna Be Bad When…","url":"https://daily.dev/posts/t-sql-tuesday-roundup-you-know-a-query-s-gonna-be-bad-when--bga9ihrqg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/t-sql-tuesday-roundup-you-know-a-query-s-gonna-be-bad-when--bga9ihrqg"},"datePublished":"2026-07-21T13:15:36.579Z","dateModified":"2026-07-21T13:15:57.181Z","description":"A roundup of T-SQL Tuesday #200 where community contributors shared their red flags for spotting bad SQL queries. Warning signs covered include WHILE loops and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0a4a5cc126b714991c5f2cd40981d336?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0a4a5cc126b714991c5f2cd40981d336?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Brent Ozar","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Brent Ozar","logo":"https://media.daily.dev/image/upload/s--uHhajUhc--/c_limit,w_256/f_auto,q_auto/v1780213426/logos/brentozar?_a=BAMAMiWQ0","url":"https://daily.dev/sources/brentozar"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/t-sql-tuesday-roundup-you-know-a-query-s-gonna-be-bad-when--bga9ihrqg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"microsoft-sql-server","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Brent Ozar","item":"https://daily.dev/sources/brentozar"},{"@type":"ListItem","position":3,"name":"T-SQL Tuesday Roundup: You Know A Query’s Gonna Be Bad When…"}]}
```

