Quantcast
Channel: Answers for "SQL practises that iterate... er irritate you."
Browsing latest articles
Browse All 30 View Live

Answer by TimothyAWiseman

I'll second all of the ones you've listed and add a couple: 1. Starting user stored procedures with 'sp_'. 2. Using dynamic SQL where there is no reason for it. 3. Writing long creation sequences for a...

View Article



Answer by Scot Hauder

Using Linq to SQL or any ORM for that matter and putting all your queries in source code. 1. Query logic existing at a layer on top of T-SQL makes them almost impossible to optimize. 2. Make a change...

View Article

Answer by ThomasRushton

Fields whose usage (and, indeed, valid data types & ranges) depend upon the value held in another field. Seriously - sometimes it was a phone number, sometimes a reference to another record,...

View Article

Answer by ThomasRushton

Hyphens in object names & database names. And, let's be brutally honest, I'm not just looking at the in-house developers here, but 3rd party consultancies who should know better.

View Article

Answer by ThomasRushton

Scheduled tasks & jobs whose name is a guid.

View Article


Answer by Håkan Winther

I hate too large datatypes, like decimal(25,5) to store the cost for a single phonecall. I recently decreased the size of a database to half the size (from 1TB) by using smaller datatypes ( and I still...

View Article

Answer by Matt Whitfield

Mine is 'future proof design' that actually means 'loosely typed schema'. I have to say, I have been guilty of this in the past. However, I am glad to say I've learnt that particular lesson the hard...

View Article

Answer by Cyborg

- Poor Database Design (Too much normalization, or Too much demineralization) - Improper Data types and Lengths (Causes Performance degrade because of increased data pages results more logical/physical...

View Article


Answer by David Wimbush

I agree that the stuff you guys list are more important than this but(!) I really hate badly laid out SQL. When it's a big gnarly proc and the code looks like a two-year old randomly battered the arrow...

View Article


Answer by dvroman

Procedures / Views / Functions with no formatting (The entire query on one line).

View Article

Answer by Blackhawk-17

Applications that ***require*** SA or DBO privileges...

View Article

Answer by ThomasRushton

Me: Hey guys, what's generating this error message 300k times a day? "Backup Log with Truncate Only or with NO_Log is deprecated" Them: Oh, don't worry about that, it's a database that's being built...

View Article

Answer by Mark

This one will probably be somewhat controversial but, here 'goes anyway... All of the tables with "not NULL" on all of the columns when they are not necessary. So when inserting a row, you often have...

View Article


Answer by goyo

I have to agree with [Kevin Kline][1] on this one: 1. Using cursors heavily in Transact-SQL code, set theory vs. row theory 2. Not understanding the query engine 3. Not understanding how to tune...

View Article

Answer by Lawndemon

I love finding tables with only one column along with column names that are reserved words like [date].

View Article

Browsing latest articles
Browse All 30 View Live




Latest Images