Top Banner
27

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

Jun 22, 2015

Download

Technology

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
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
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