Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

How to spot a SQL Antipattern

15 January,2016 by Tom Collins

Survival in the DBA world is following good practises but just as importantly it is about  identifying bad practises. Bad practises can also be called antipatterns. An antipatterns  is a standardised fix to a common problem that may lead to a counterproductive outcome.

There is a well known book – AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis – where this term was first coined. The authors highlighted two criteria required to satisfy a fix as an antipattern

  1. A commonly used fix or solution , which may appear to solve the issue , but tends to bad consequences. A simple example may be : SELECT *
  2. A credible alternative exists, which if employed, leads to a positive consequence. A simple example , in response to SELECT * is SELECT col1, col2,

There are hundreds of examples in all fields. You may have heard of cart before the horse, scope creep, stovepipe system, blind faith, accidental complexity,busy waiting, hard coding. There are plenty more concepts used which represent this idea of antipattern.

Keeping an eagle eye and having processes in place to identify these SQL Antipatterns, can yield some serious improvements in database server systems and supporting systems management processes.

I’ve started a series called SQL Antipattern. I’ll be posting SQL Antipatterns sightings.

Using NULL as an ordinary value in sql code - SQL Antipattern # 001

The practise of Hard Coding – SQL Antipattern #002

SQL Silver Bullets and Easy Fixes - SQL Antipattern #003

Blind Faith versus Test Oriented programming – SQL Antipattern #004

DRY or WET – SQL Antipattern #005

Performance Tuning by Committee - SQL Antipattern #006

Accidental complexity - SQL Antipattern #007

Premature optimization - SQL Antipattern #008

Query to find non – sargable sql statements – SQL Antipattern #009

T SQL Antipatterns - SQL Antipattern #010

 


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to spot a SQL Antipattern


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer