re: SQL 201: 10 Ways to Tweak Slow Running Queries VIEW POST

FULL DISCUSSION
 

You could make a lifelong career by taking this one article out on the road and doing a series of day-long workshops on these tips and advice in companies, large and small, all over the world. Seriously.

I'm laughing away at #3 as memories of some queries I've QAed in the past come back to me. SELECT * on whole multi-year monthly snapshot tables which are aliased and then joined back to themselves with no WHERE clause on either side. And people wondered why it took hours to run (and eventually fall over).

 

SELECT * on whole multi-year monthly snapshot tables which are aliased and then joined back to themselves with no WHERE clause on either side. And people wondered why it took hours to run (and eventually fall over).

OMG! :D

 

WOW! That makes my head spin.

The more I delve into database best practice in the real world, the more tricky it becomes.

I want to fix all-the-things but at the same time, there is the pressure that something should be consistently-wrong. As much as it makes my skin crawl that something isn't right, I get that you have to roll with it becomes something has been done 'slightly wrong' forever ... even if it takes forever to run.

code of conduct - report abuse