improve your t-sql by changing your writing habits - red gate style

27

Upload: red-gate-software

Post on 22-Jun-2015

175 views

Category:

Technology


1 download

DESCRIPTION

Presentation from Mickey Stuewe, Sr. SQL Database Developer. Formatting T-SQL for Readability How SQL Prompt can help you How to Templatize Your Favorite Scripts How to Add Unique Information to Generic Templates How to Look for Implicit Conversions Why Top Down Design Is Not the Best Choice for T-SQL Temp Tables vs Table Variables vs Materialized Tables How to Replace Cursors

TRANSCRIPT

Page 1: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style
Page 2: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 3: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 4: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 5: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 6: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 8: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style
Page 9: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 10: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Prior to version 6.0 New in version 6.0

$CURSOR$ $PASTE$

$DATE$ $SERVER$

$TIME$ $DBNAME$

$USER$

$MACHINE$

Page 11: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style
Page 12: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style
Page 13: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 14: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style
Page 15: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 16: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

• ••

Page 17: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 18: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 19: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 20: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

• ••

Page 21: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style
Page 22: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Rows to Process 30,000

Iterations 40

Rows Processed 1,200,000

Rows to Process 30,000

1 Scalar function accessing 100 rows per function call

100

Rows Processed 3,000,000

Page 23: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Rows to Process 30,000

Iterations 40

Rows Processed 1,200,000

Rows to Process 30,000

1 Scalar function accessing 100 rows per function call

100

Rows Processed 3,000,000

Page 24: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style
Page 25: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Page 26: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style

Thank You

Page 27: Improve Your T-SQL by Changing Your Writing Habits - Red Gate Style