Ten Things
description
Transcript of Ten Things
![Page 1: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/1.jpg)
TEN THINGS
Y O U DO T
H A T MA K E S
Q L SE R V E R C
R Y
![Page 2: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/2.jpg)
JEN MCCOWNMicrosoft SQL Server MVP recipientSQL Server developer and DBA MidnightDBA.com [email protected] MidnightDBA.com/Jen Twitter.com/MidnightDBA webshow.MidnightDBA.com Fridays 11pm CST
![Page 3: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/3.jpg)
1. Design2. Ugly code3. ! Performance4. !
Documentation
5. ! Testing
6. ! Understanding
7. Disk8. Profiler9. Indexing10.Backups and
maintenance
OVERVIEW: THE 10 THINGS
![Page 4: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/4.jpg)
THING 1: DESIGN Unreadable names Bad datatypes Duplicate columns Multipurpose columns No relational integrity And much, much more!
![Page 5: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/5.jpg)
THING 2: UGLY CODEUgly code is scary
![Page 6: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/6.jpg)
THING 3: PERFORMANCECursorsNested viewsLock hintsJust not bothering with it…
![Page 7: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/7.jpg)
THING 4: ! DOCUMENTATIONNobody likes making documentation:• It's a pain• It gets out of date• Nobody reads it• “Don't need it!“• "I can do it when the project is done!“• “I'll document myself out of a job!"
![Page 8: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/8.jpg)
THING 5: ! TESTING 1. Code on dev or on a sandbox. Don't make changes in
production! 2. Run your code...on dev. 3. Script out your deployment, and test that. 4. Have a rollback script, and test THAT. 5. Especially if you don't have a decent QA, watch the changes
in production. Remember, "it always runs fast on the dev box".
![Page 9: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/9.jpg)
THING 6: ! UNDERSTANDINGKnow before you GO
![Page 10: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/10.jpg)
THING 7: DISKDisk Partition AlignmentRAID levelsMuch more
![Page 11: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/11.jpg)
THING 8: PROFILERDon’t run SQL Profiler on productionSQL Profiler can bring down production
Instead: Server Side Trace: The What, Why, and Howbit.ly/19x2wBD
![Page 12: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/12.jpg)
THING 9: ! INDEXINGHuh. Apparently this is an “index” clipart.
Indexes are good! Use them…But there's a balance.Don't index every column of a table individually!
![Page 13: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/13.jpg)
THING 10: ! BACKUPS / MAINTENANCEYou need backupsYou need maintenanceYou need alerting
Suggested: SQL Server Maintenance Solution http://ola.hallengren.com
![Page 14: Ten Things](https://reader035.fdocuments.us/reader035/viewer/2022062521/568166ff550346895ddb66a1/html5/thumbnails/14.jpg)
OTHER RESOURCESAll session materials available at MidnightDBA.com/Jen
Contact me: [email protected]/MidnightDBA Other resources: •MidnightDBA.com • SQLServerSamples.codeplex.com (AdventureWorks)• SSMSToolsPack.com•Ola.Hallengren.com