SlideShare a Scribd company logo
Grab
some
coffee
and
enjoy
the pre-
show
banter
before
H TTechnologies of 2017
HOST:
Eric Kavanagh
@eric_kavanagh
THIS YEAR is…
THELINEUP
ANALYST:
Dez Blanchfield
Data Scientist,
The Bloor Group
ANALYST:
Robin Bloor
Chief Analyst,
The Bloor Group
GUEST:
Bert Scalzo
Senior Product Manager,
IDERA
INTRODUCING
Robin Bloor
About Bug Hunting
Robin Bloor Ph.D.
Famous Bugs
u 1998: NASA’s Mars Climate Orbiter lost in
space: (units problem)
u Ariane 5 Flight 501 self-destructs after
multiple computer failures (1996)
u Soviet Gas Pipeline in 1982 – stolen
automated control software (CIA hacked)
u Morris Worm – a harmless coding
experiment became a worm (Cornell Univ
- 1988)
u Pentium chip math error (1993)
u Apple Maps (2012) – disastrous launch
u AT&T long distance outage (1990) costs
$60m
u UK insurance company (1993) database
wipes data
file://localhost/Users/robinbloor2/Dropbox/~Deskto
p/bottlenecks.jpg
The Impedance Mismatch
The RDBMS stores data
organized in tables
The OO coder manipulates data
organized in object structures,
with associated methods
The data does not simply map to
the database table structures so
a mapping is necessary
Basically: hierarchies, types,
result sets, poor APIs, language
bindings, tools
file://localhost/Users/robinbloor2/Dropbox/~Deskto
p/bottlenecks.jpg
The Impedance Mismatch
SQL has:
DDL (for data definition)
DML (for Select, Project and
Join)
But it has little MML (Math) or
TML (Time)
Usually result sets are brought to
the client for further analytical
manipulation, but this creates
problems
Alternatively doing all analytical
manipulation in the database
creates problems
file://localhost/Users/robinbloor2/Dropbox/~Deskto
p/bottlenecks.jpg
Database Performance Bottlenecks
CPU: CPU overload, context
switches, I/O waits, CPU cache,
Backplane throughput
Memory: Thrashing,
fragmentation
Disk: Caching, I/O saturation,
fragmentation, SSD performance
Network Overhead (SANs, NAS,
local disk)
Locking
Database Performance Factors
Bad database design
Bad program design
Concurrency, workload
mixing
Load balancing
Capacity planning – data
growth
Data layer issues
In A Few Words
Database debugging can be onerous
and non-trivial
INTRODUCING
Dez Blanchfield
There are many stories about how the terms “bug” and
“debugging” came about – one of them claims that “On
September 9, 1945, in the USA, a Harvard technical
team looked at Panel F of the Harvard's Mark II
computer, and found something unusual between points
in Relay 70”.
Apparently it was a moth, which they promptly
removed and taped in the log book. Supposedly the
legendary Grace Hopper added a caption which read
“First actual case of bug being found," and it’s long
been claimed that this was the first time anyone used
the word bug to describe a computer glitch. Naturally,
the term debugging followed.
A	Boy	named	Robert');	DROP	TABLE	students;--
Little	Bobble	Tables..
I	doubt	any	programmer	anticipated	a	“hit	&	run”	of	their	code	
by	a	motor	vehicle,	but	never	under	estimate	angry	geeks..
Not	a	bug	bug	funny	all	the	same
there	was	a	time	when	
debugging	and	profiling	code	
could	be	done	by	mere	mortals..
that	time	has	long	passed..
Some Code Reviews Require Rocket Science
x$objQuery = $this->db->query
( "SELECT rd.*, ((rd.rd_numberofrooms) - (select
sum(rn.reservation_numberofrooms) as
count_reserve_room from reservation as rn WHERE
rn.reservation_rd_id = rd.rd_id AND
(str_to_date('$data_Check_in_date','%d-%m-%y')
BETWEEN
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND
str_to_date(rn.reservation_check_out_date,'%d-%m-
%y') OR str_to_date('$data_Check_out_date','%d-%m-
%y') BETWEEN
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND
str_to_date(rn.reservation_check_out_date,'%d-%m-
%y') OR str_to_date('$data_Check_in_date','%d-%m-
%y') <=
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND str_to_date('$data_Check_out_date','%d-%m-
%y') ) )) as reserve
FROM room_details rd LEFT JOIN reservation rn ON
rd.rd_id = rn.reservation_rd_id WHERE NOT EXISTS
(
SELECT rn.* FROM reservation rn WHERE
rn.reservation_rd_id = rd.rd_id
AND (str_to_date('$data_Check_in_date','%d-%m-%y')
BETWEEN
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND
str_to_date(rn.reservation_check_out_date,'%d-%m-
%y') OR str_to_date('$data_Check_out_date','%d-%m-
%y') BETWEEN
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND
str_to_date(rn.reservation_check_out_date,'%d-%m-
%y') OR str_to_date('$data_Check_in_date','%d-%m-
%y') <=
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND str_to_date('$data_Check_out_date','%d-%m-
%y') >=
str_to_date(rn.reservation_check_out_date,'%d-%m-
%y'))
AND (rd.rd_numberofrooms <= (select
sum(rn.reservation_numberofrooms) as
count_reserve_room from reservation as rn WHERE
rn.reservation_rd_id = rd.rd_id AND
(str_to_date('$data_Check_in_date','%d-%m-%y')
BETWEEN
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND
str_to_date(rn.reservation_check_out_date,'%d-%m-
%y') OR str_to_date('$data_Check_out_date','%d-%m-
%y') BETWEEN
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND
str_to_date(rn.reservation_check_out_date,'%d-%m-
%y') OR str_to_date('$data_Check_in_date','%d-%m-
%y') <=
str_to_date(rn.reservation_check_in_date,'%d-%m-
%y') AND str_to_date('$data_Check_out_date','%d-%m-
%y') ) ) )
)
");
www.quora.com/Whats-the-most-complex-SQL-query-you-ever-wrote
INTRODUCING
Bert Scalzo
© 2017 IDERA, Inc. All rights reserved.
RAPID RESPONSE:
DATABASE DEBUGGING AND
PROFILING TO THE RESCUE
Bert Scalzo, Senior Product Manager
25© 2017 IDERA, Inc. All rights reserved.
PROGRAMMING HISTORY
•1951 – Assembly
•1952 – Autocode
•1954 – IPL
•1955 – FLOW-MATIC
•1957 – FORTRAN
•1957 – COMTRAN
•1958 – LISP
•1958 – ALGOL 58
•1959 – FACT
•1959 – COBOL
•1959 – RPG
•1962 – APL
•1962 – Simula
•1962 – SNOBOL
•1963 – CPL
•1964 – Speakeasy
•1964 – BASIC
•1964 – PL/I
•1966 – JOSS
•1967 – BCPL
•1968 – Logo
•1969 – B
•1970 – Pascal
•1970 – Forth
•1972 – C
•1972 – Smalltalk
•1972 – Prolog
•1973 – ML
•1975 – Scheme
•1978 – SQL
•1980 – C++
•1983 – Ada
•1984 – Common Lisp
•1984 – MATLAB
•1985 – Eiffel
•1986 – Objective-C
•1986 – Erlang
•1987 – Perl
•1988 – Tcl
•1988 – Wolfram Language
•1989 – FL
•2000 – ActionScript
•2001 – C#
•2003 – Groovy
•2003 – Scala
•2005 – F#
•2006 – PowerShell
•2007 – Clojure
•2009 – Go
•2010 – Rust
•2011 – Dart
•2012 – Julia
•2014 – Swift
Note this point in history. Can you
guess why it’s marked? (session title)
26© 2017 IDERA, Inc. All rights reserved.
§ Instrumentation / Print Statements / Trace File
§ Interactive Debugger
• First appeared in 1977
• Good for finding logic mistakes (i.e. effectiveness)
• Remote Debugging (special case – e.g. database)
• Common Terminology
• Breakpoints
• Watch values
• Step into
• Step over
DEBUGGING
27© 2017 IDERA, Inc. All rights reserved.
PROFILING
§ Sampling / Instruction Set Simulators
§ Instrumentation / Print Statements / Trace File
§ Profiler (Dynamic Program Analysis)
• First appeared in 1979
• Good for finding resource consumption and performance
bottlenecks (i.e. efficiency)
• Generally separate & distinct from the debugger
• Not generally utilized as often as debuggers
28© 2017 IDERA, Inc. All rights reserved.
DB LANGUAGES
§ Some database vendors offer 3GL languages that
“compile code” within the database
• Oracle: PL/SQL
• SQL Server: Transact-SQL (T-SQL)
• SQL-1999: SQL/PSM
• PostgreSQL: PL/pgSQL
• DB2: SQL PL
• Informix: SPL
29© 2017 IDERA, Inc. All rights reserved.
DB OBJECTS
§ What database objects are built using procedural
languages?
• Triggers
• (Stored) Procedures
• (Stored) Functions
• Packages (Oracle only)
30© 2017 IDERA, Inc. All rights reserved.
DEBUGGER EXAMPLE (OLD WAY)
31© 2017 IDERA, Inc. All rights reserved.
DEBUGGER EXAMPLE (OLD WAY)
32© 2017 IDERA, Inc. All rights reserved.
DEBUGGER EXAMPLE (INTERACTIVE)
Hover over variable to see
value
Stepping cursor a line at a time
Setting a breakpoint to run to
Local variables autowatched
Call stack for all procedural
code
33© 2017 IDERA, Inc. All rights reserved.
PROFILER EXAMPLE #1 (DEBUGGER)
This loop consumed most time,
so anything I can do inside it to
improve performanceshould
pay dividends
34© 2017 IDERA, Inc. All rights reserved.
PROFILER EXAMPLE #2 (CODE ANALYST)
This loop consumed most time,
so anything I can do inside it to
improve performanceshould
pay dividends
35© 2017 IDERA, Inc. All rights reserved.
BUSINESS REQUIREMENTS
§ Since we write code to perform some task, we must mandatorily
perform the task correctly (i.e. effective)
• DEBUGGER
§ Since users are impatient and want the results even before they
press the key, or preferably yesterday (i.e. efficient)
• PROFILER
§ Without these tools, we’re shooting blindfolded!
36© 2017 IDERA, Inc. All rights reserved.
DEMO
Will demonstrate typical database debugger and profiler in
a typical database administration and/or development tool
like IDERA’s DBArtisan®
and Rapid SQL®
37© 2017 IDERA, Inc. All rights reserved.
Q&A
The Archive Trifecta:
• Inside Analysis www.insideanalysis.com
• SlideShare www.slideshare.net/InsideAnalysis
• YouTube www.youtube.com/user/BloorGroup
THANK YOU!

More Related Content

Viewers also liked

Summer '12のワイルドな新機能+
Summer '12のワイルドな新機能+Summer '12のワイルドな新機能+
Summer '12のワイルドな新機能+
Mitch Okamoto
 
The New Normal: Dealing with the Reality of an Unsecure World
The New Normal: Dealing with the Reality of an Unsecure WorldThe New Normal: Dealing with the Reality of an Unsecure World
The New Normal: Dealing with the Reality of an Unsecure World
Eric Kavanagh
 
A Product Managers Survival Guide Transition to Agile (Agile 2008)
A Product Managers Survival Guide Transition to Agile (Agile 2008)A Product Managers Survival Guide Transition to Agile (Agile 2008)
A Product Managers Survival Guide Transition to Agile (Agile 2008)
Rasmus Mencke
 
Wave : Analytics Cloudとは
Wave : Analytics CloudとはWave : Analytics Cloudとは
Wave : Analytics Cloudとは
Mitch Okamoto
 
The Central Hub: Defining the Data Lake
The Central Hub: Defining the Data LakeThe Central Hub: Defining the Data Lake
The Central Hub: Defining the Data Lake
Eric Kavanagh
 
Mind Your Business: Why Privacy Matters to the Successful Enterprise
 Mind Your Business: Why Privacy Matters to the Successful Enterprise Mind Your Business: Why Privacy Matters to the Successful Enterprise
Mind Your Business: Why Privacy Matters to the Successful Enterprise
Eric Kavanagh
 
Heroku CIを触ってみる
Heroku CIを触ってみるHeroku CIを触ってみる
Heroku CIを触ってみる
Mitch Okamoto
 
A Tight Ship: How Containers and SDS Optimize the Enterprise
 A Tight Ship: How Containers and SDS Optimize the Enterprise A Tight Ship: How Containers and SDS Optimize the Enterprise
A Tight Ship: How Containers and SDS Optimize the Enterprise
Eric Kavanagh
 
SQL 脳から見た Ruby
SQL 脳から見た RubySQL 脳から見た Ruby
SQL 脳から見た Ruby
yancya
 
紹介 of Anemometer
紹介 of Anemometer紹介 of Anemometer
紹介 of Anemometer
yoku0825
 
地雷職人の朝は早い
地雷職人の朝は早い地雷職人の朝は早い
地雷職人の朝は早い
yoku0825
 
A Bigger Magnifying Glass: Analyzing the Internet of Things
A Bigger Magnifying Glass: Analyzing the Internet of Things	A Bigger Magnifying Glass: Analyzing the Internet of Things
A Bigger Magnifying Glass: Analyzing the Internet of Things
Eric Kavanagh
 
5.7の次のMySQL
5.7の次のMySQL5.7の次のMySQL
5.7の次のMySQL
yoku0825
 
ペパボ de MySQL
ペパボ de MySQLペパボ de MySQL
ペパボ de MySQL
yoku0825
 
MySQLアンチパターン
MySQLアンチパターンMySQLアンチパターン
MySQLアンチパターン
yoku0825
 
50 common interview questions and answers
50 common interview questions and answers50 common interview questions and answers
50 common interview questions and answersKumar
 
mikasafabric for MySQL
mikasafabric for MySQLmikasafabric for MySQL
mikasafabric for MySQL
yoku0825
 

Viewers also liked (17)

Summer '12のワイルドな新機能+
Summer '12のワイルドな新機能+Summer '12のワイルドな新機能+
Summer '12のワイルドな新機能+
 
The New Normal: Dealing with the Reality of an Unsecure World
The New Normal: Dealing with the Reality of an Unsecure WorldThe New Normal: Dealing with the Reality of an Unsecure World
The New Normal: Dealing with the Reality of an Unsecure World
 
A Product Managers Survival Guide Transition to Agile (Agile 2008)
A Product Managers Survival Guide Transition to Agile (Agile 2008)A Product Managers Survival Guide Transition to Agile (Agile 2008)
A Product Managers Survival Guide Transition to Agile (Agile 2008)
 
Wave : Analytics Cloudとは
Wave : Analytics CloudとはWave : Analytics Cloudとは
Wave : Analytics Cloudとは
 
The Central Hub: Defining the Data Lake
The Central Hub: Defining the Data LakeThe Central Hub: Defining the Data Lake
The Central Hub: Defining the Data Lake
 
Mind Your Business: Why Privacy Matters to the Successful Enterprise
 Mind Your Business: Why Privacy Matters to the Successful Enterprise Mind Your Business: Why Privacy Matters to the Successful Enterprise
Mind Your Business: Why Privacy Matters to the Successful Enterprise
 
Heroku CIを触ってみる
Heroku CIを触ってみるHeroku CIを触ってみる
Heroku CIを触ってみる
 
A Tight Ship: How Containers and SDS Optimize the Enterprise
 A Tight Ship: How Containers and SDS Optimize the Enterprise A Tight Ship: How Containers and SDS Optimize the Enterprise
A Tight Ship: How Containers and SDS Optimize the Enterprise
 
SQL 脳から見た Ruby
SQL 脳から見た RubySQL 脳から見た Ruby
SQL 脳から見た Ruby
 
紹介 of Anemometer
紹介 of Anemometer紹介 of Anemometer
紹介 of Anemometer
 
地雷職人の朝は早い
地雷職人の朝は早い地雷職人の朝は早い
地雷職人の朝は早い
 
A Bigger Magnifying Glass: Analyzing the Internet of Things
A Bigger Magnifying Glass: Analyzing the Internet of Things	A Bigger Magnifying Glass: Analyzing the Internet of Things
A Bigger Magnifying Glass: Analyzing the Internet of Things
 
5.7の次のMySQL
5.7の次のMySQL5.7の次のMySQL
5.7の次のMySQL
 
ペパボ de MySQL
ペパボ de MySQLペパボ de MySQL
ペパボ de MySQL
 
MySQLアンチパターン
MySQLアンチパターンMySQLアンチパターン
MySQLアンチパターン
 
50 common interview questions and answers
50 common interview questions and answers50 common interview questions and answers
50 common interview questions and answers
 
mikasafabric for MySQL
mikasafabric for MySQLmikasafabric for MySQL
mikasafabric for MySQL
 

Similar to Rapid Response: Debugging and Profiling to the Rescue

Rustbridge
RustbridgeRustbridge
Rustbridge
kent marete
 
Programming skills
Programming skillsProgramming skills
Programming skills
COMMON Europe
 
Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf Tools
Raj Pandey
 
Tech
TechTech
Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1
Jay Coskey
 
2013 Hello GCC:The Theory, History and Future of System Linkers
2013 Hello GCC:The Theory, History and Future of System Linkers2013 Hello GCC:The Theory, History and Future of System Linkers
2013 Hello GCC:The Theory, History and Future of System Linkers
Ching-Yi Chen
 
DRUG - RDSTK Talk
DRUG - RDSTK TalkDRUG - RDSTK Talk
DRUG - RDSTK Talkrtelmore
 
COBOL and Computer Science
COBOL and Computer ScienceCOBOL and Computer Science
COBOL and Computer Science
aturley_slides
 
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
David Beazley (Dabeaz LLC)
 
History of computer language
History of computer languageHistory of computer language
History of computer languageClaire Punkcor
 
My amazing journey from mainframes to smartphones chm lecture aug 2014 final
My amazing journey from mainframes to smartphones  chm lecture aug 2014 finalMy amazing journey from mainframes to smartphones  chm lecture aug 2014 final
My amazing journey from mainframes to smartphones chm lecture aug 2014 final
Dileep Bhandarkar
 
Getting Started with Hadoop
Getting Started with HadoopGetting Started with Hadoop
Getting Started with Hadoop
Josh Devins
 
A Replay Approach to Software Validation
A Replay Approach to Software ValidationA Replay Approach to Software Validation
A Replay Approach to Software ValidationJames Pascoe
 
Introduction to kdb+
Introduction to kdb+Introduction to kdb+
Introduction to kdb+
Rory Winston
 
Creativity in Digital Scholarship
Creativity in Digital ScholarshipCreativity in Digital Scholarship
Creativity in Digital Scholarship
David De Roure
 
BSA Programming Merit Badge STEM
BSA Programming Merit Badge STEMBSA Programming Merit Badge STEM
BSA Programming Merit Badge STEM
Eric Silva
 
designpatterns_blair_upe.ppt
designpatterns_blair_upe.pptdesignpatterns_blair_upe.ppt
designpatterns_blair_upe.ppt
banti43
 

Similar to Rapid Response: Debugging and Profiling to the Rescue (20)

Rustbridge
RustbridgeRustbridge
Rustbridge
 
Programming skills
Programming skillsProgramming skills
Programming skills
 
Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf Tools
 
iSoligorsk #3 2013
iSoligorsk #3 2013iSoligorsk #3 2013
iSoligorsk #3 2013
 
Tech
TechTech
Tech
 
Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1
 
2013 Hello GCC:The Theory, History and Future of System Linkers
2013 Hello GCC:The Theory, History and Future of System Linkers2013 Hello GCC:The Theory, History and Future of System Linkers
2013 Hello GCC:The Theory, History and Future of System Linkers
 
DRUG - RDSTK Talk
DRUG - RDSTK TalkDRUG - RDSTK Talk
DRUG - RDSTK Talk
 
COBOL and Computer Science
COBOL and Computer ScienceCOBOL and Computer Science
COBOL and Computer Science
 
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
 
History of computer language
History of computer languageHistory of computer language
History of computer language
 
My amazing journey from mainframes to smartphones chm lecture aug 2014 final
My amazing journey from mainframes to smartphones  chm lecture aug 2014 finalMy amazing journey from mainframes to smartphones  chm lecture aug 2014 final
My amazing journey from mainframes to smartphones chm lecture aug 2014 final
 
Getting Started with Hadoop
Getting Started with HadoopGetting Started with Hadoop
Getting Started with Hadoop
 
A Replay Approach to Software Validation
A Replay Approach to Software ValidationA Replay Approach to Software Validation
A Replay Approach to Software Validation
 
Introduction to kdb+
Introduction to kdb+Introduction to kdb+
Introduction to kdb+
 
Creativity in Digital Scholarship
Creativity in Digital ScholarshipCreativity in Digital Scholarship
Creativity in Digital Scholarship
 
IT/Tech quiz
IT/Tech quizIT/Tech quiz
IT/Tech quiz
 
BSA Programming Merit Badge STEM
BSA Programming Merit Badge STEMBSA Programming Merit Badge STEM
BSA Programming Merit Badge STEM
 
designpatterns_blair_upe.ppt
designpatterns_blair_upe.pptdesignpatterns_blair_upe.ppt
designpatterns_blair_upe.ppt
 
P1 2017 python
P1 2017 pythonP1 2017 python
P1 2017 python
 

More from Eric Kavanagh

The Future of Data Warehousing and Data Integration
The Future of Data Warehousing and Data IntegrationThe Future of Data Warehousing and Data Integration
The Future of Data Warehousing and Data Integration
Eric Kavanagh
 
Best Practices in DataOps: How to Create Agile, Automated Data Pipelines
Best Practices in DataOps: How to Create Agile, Automated Data PipelinesBest Practices in DataOps: How to Create Agile, Automated Data Pipelines
Best Practices in DataOps: How to Create Agile, Automated Data Pipelines
Eric Kavanagh
 
Expediting the Path to Discovery with Multi-Source Analysis
Expediting the Path to Discovery with Multi-Source AnalysisExpediting the Path to Discovery with Multi-Source Analysis
Expediting the Path to Discovery with Multi-Source Analysis
Eric Kavanagh
 
Will AI Eliminate Reports and Dashboards
Will AI Eliminate Reports and DashboardsWill AI Eliminate Reports and Dashboards
Will AI Eliminate Reports and Dashboards
Eric Kavanagh
 
Metadata Mastery: A Big Step for BI Modernization
Metadata Mastery: A Big Step for BI ModernizationMetadata Mastery: A Big Step for BI Modernization
Metadata Mastery: A Big Step for BI Modernization
Eric Kavanagh
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database Roundtable
Eric Kavanagh
 
Database Survival Guide: Exploratory Webcast
Database Survival Guide: Exploratory WebcastDatabase Survival Guide: Exploratory Webcast
Database Survival Guide: Exploratory Webcast
Eric Kavanagh
 
Better to Ask Permission? Best Practices for Privacy and Security
Better to Ask Permission? Best Practices for Privacy and SecurityBetter to Ask Permission? Best Practices for Privacy and Security
Better to Ask Permission? Best Practices for Privacy and Security
Eric Kavanagh
 
The Model Enterprise: A Blueprint for Enterprise Data Governance
The Model Enterprise: A Blueprint for Enterprise Data GovernanceThe Model Enterprise: A Blueprint for Enterprise Data Governance
The Model Enterprise: A Blueprint for Enterprise Data Governance
Eric Kavanagh
 
Best Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Best Laid Plans: Saving Time, Money and Trouble with Optimal ForecastingBest Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Best Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Eric Kavanagh
 
A Winning Strategy for the Digital Economy
A Winning Strategy for the Digital EconomyA Winning Strategy for the Digital Economy
A Winning Strategy for the Digital Economy
Eric Kavanagh
 
Discovering Big Data in the Fog: Why Catalogs Matter
 Discovering Big Data in the Fog: Why Catalogs Matter Discovering Big Data in the Fog: Why Catalogs Matter
Discovering Big Data in the Fog: Why Catalogs Matter
Eric Kavanagh
 
Solving the Really Big Tech Problems with IoT
 Solving the Really Big Tech Problems with IoT Solving the Really Big Tech Problems with IoT
Solving the Really Big Tech Problems with IoT
Eric Kavanagh
 
Beyond the Platform: Enabling Fluid Analysis
Beyond the Platform: Enabling Fluid AnalysisBeyond the Platform: Enabling Fluid Analysis
Beyond the Platform: Enabling Fluid Analysis
Eric Kavanagh
 
Protect Your Database: High Availability for High Demand Data
 Protect Your Database: High Availability for High Demand Data Protect Your Database: High Availability for High Demand Data
Protect Your Database: High Availability for High Demand Data
Eric Kavanagh
 
A Better Understanding: Solving Business Challenges with Data
A Better Understanding: Solving Business Challenges with DataA Better Understanding: Solving Business Challenges with Data
A Better Understanding: Solving Business Challenges with Data
Eric Kavanagh
 
The Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning QueriesThe Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning Queries
Eric Kavanagh
 
Application Acceleration: Faster Performance for End Users
Application Acceleration: Faster Performance for End Users	Application Acceleration: Faster Performance for End Users
Application Acceleration: Faster Performance for End Users
Eric Kavanagh
 
Time's Up! Getting Value from Big Data Now
Time's Up! Getting Value from Big Data NowTime's Up! Getting Value from Big Data Now
Time's Up! Getting Value from Big Data Now
Eric Kavanagh
 
See the Whole Story: The Case for a Visualization Platform
See the Whole Story: The Case for a Visualization PlatformSee the Whole Story: The Case for a Visualization Platform
See the Whole Story: The Case for a Visualization Platform
Eric Kavanagh
 

More from Eric Kavanagh (20)

The Future of Data Warehousing and Data Integration
The Future of Data Warehousing and Data IntegrationThe Future of Data Warehousing and Data Integration
The Future of Data Warehousing and Data Integration
 
Best Practices in DataOps: How to Create Agile, Automated Data Pipelines
Best Practices in DataOps: How to Create Agile, Automated Data PipelinesBest Practices in DataOps: How to Create Agile, Automated Data Pipelines
Best Practices in DataOps: How to Create Agile, Automated Data Pipelines
 
Expediting the Path to Discovery with Multi-Source Analysis
Expediting the Path to Discovery with Multi-Source AnalysisExpediting the Path to Discovery with Multi-Source Analysis
Expediting the Path to Discovery with Multi-Source Analysis
 
Will AI Eliminate Reports and Dashboards
Will AI Eliminate Reports and DashboardsWill AI Eliminate Reports and Dashboards
Will AI Eliminate Reports and Dashboards
 
Metadata Mastery: A Big Step for BI Modernization
Metadata Mastery: A Big Step for BI ModernizationMetadata Mastery: A Big Step for BI Modernization
Metadata Mastery: A Big Step for BI Modernization
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database Roundtable
 
Database Survival Guide: Exploratory Webcast
Database Survival Guide: Exploratory WebcastDatabase Survival Guide: Exploratory Webcast
Database Survival Guide: Exploratory Webcast
 
Better to Ask Permission? Best Practices for Privacy and Security
Better to Ask Permission? Best Practices for Privacy and SecurityBetter to Ask Permission? Best Practices for Privacy and Security
Better to Ask Permission? Best Practices for Privacy and Security
 
The Model Enterprise: A Blueprint for Enterprise Data Governance
The Model Enterprise: A Blueprint for Enterprise Data GovernanceThe Model Enterprise: A Blueprint for Enterprise Data Governance
The Model Enterprise: A Blueprint for Enterprise Data Governance
 
Best Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Best Laid Plans: Saving Time, Money and Trouble with Optimal ForecastingBest Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Best Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
 
A Winning Strategy for the Digital Economy
A Winning Strategy for the Digital EconomyA Winning Strategy for the Digital Economy
A Winning Strategy for the Digital Economy
 
Discovering Big Data in the Fog: Why Catalogs Matter
 Discovering Big Data in the Fog: Why Catalogs Matter Discovering Big Data in the Fog: Why Catalogs Matter
Discovering Big Data in the Fog: Why Catalogs Matter
 
Solving the Really Big Tech Problems with IoT
 Solving the Really Big Tech Problems with IoT Solving the Really Big Tech Problems with IoT
Solving the Really Big Tech Problems with IoT
 
Beyond the Platform: Enabling Fluid Analysis
Beyond the Platform: Enabling Fluid AnalysisBeyond the Platform: Enabling Fluid Analysis
Beyond the Platform: Enabling Fluid Analysis
 
Protect Your Database: High Availability for High Demand Data
 Protect Your Database: High Availability for High Demand Data Protect Your Database: High Availability for High Demand Data
Protect Your Database: High Availability for High Demand Data
 
A Better Understanding: Solving Business Challenges with Data
A Better Understanding: Solving Business Challenges with DataA Better Understanding: Solving Business Challenges with Data
A Better Understanding: Solving Business Challenges with Data
 
The Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning QueriesThe Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning Queries
 
Application Acceleration: Faster Performance for End Users
Application Acceleration: Faster Performance for End Users	Application Acceleration: Faster Performance for End Users
Application Acceleration: Faster Performance for End Users
 
Time's Up! Getting Value from Big Data Now
Time's Up! Getting Value from Big Data NowTime's Up! Getting Value from Big Data Now
Time's Up! Getting Value from Big Data Now
 
See the Whole Story: The Case for a Visualization Platform
See the Whole Story: The Case for a Visualization PlatformSee the Whole Story: The Case for a Visualization Platform
See the Whole Story: The Case for a Visualization Platform
 

Recently uploaded

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

Rapid Response: Debugging and Profiling to the Rescue

  • 5. THELINEUP ANALYST: Dez Blanchfield Data Scientist, The Bloor Group ANALYST: Robin Bloor Chief Analyst, The Bloor Group GUEST: Bert Scalzo Senior Product Manager, IDERA
  • 8. Famous Bugs u 1998: NASA’s Mars Climate Orbiter lost in space: (units problem) u Ariane 5 Flight 501 self-destructs after multiple computer failures (1996) u Soviet Gas Pipeline in 1982 – stolen automated control software (CIA hacked) u Morris Worm – a harmless coding experiment became a worm (Cornell Univ - 1988) u Pentium chip math error (1993) u Apple Maps (2012) – disastrous launch u AT&T long distance outage (1990) costs $60m u UK insurance company (1993) database wipes data
  • 9. file://localhost/Users/robinbloor2/Dropbox/~Deskto p/bottlenecks.jpg The Impedance Mismatch The RDBMS stores data organized in tables The OO coder manipulates data organized in object structures, with associated methods The data does not simply map to the database table structures so a mapping is necessary Basically: hierarchies, types, result sets, poor APIs, language bindings, tools
  • 10. file://localhost/Users/robinbloor2/Dropbox/~Deskto p/bottlenecks.jpg The Impedance Mismatch SQL has: DDL (for data definition) DML (for Select, Project and Join) But it has little MML (Math) or TML (Time) Usually result sets are brought to the client for further analytical manipulation, but this creates problems Alternatively doing all analytical manipulation in the database creates problems
  • 11. file://localhost/Users/robinbloor2/Dropbox/~Deskto p/bottlenecks.jpg Database Performance Bottlenecks CPU: CPU overload, context switches, I/O waits, CPU cache, Backplane throughput Memory: Thrashing, fragmentation Disk: Caching, I/O saturation, fragmentation, SSD performance Network Overhead (SANs, NAS, local disk) Locking
  • 12. Database Performance Factors Bad database design Bad program design Concurrency, workload mixing Load balancing Capacity planning – data growth Data layer issues
  • 13. In A Few Words Database debugging can be onerous and non-trivial
  • 15.
  • 16. There are many stories about how the terms “bug” and “debugging” came about – one of them claims that “On September 9, 1945, in the USA, a Harvard technical team looked at Panel F of the Harvard's Mark II computer, and found something unusual between points in Relay 70”.
  • 17. Apparently it was a moth, which they promptly removed and taped in the log book. Supposedly the legendary Grace Hopper added a caption which read “First actual case of bug being found," and it’s long been claimed that this was the first time anyone used the word bug to describe a computer glitch. Naturally, the term debugging followed.
  • 21. Some Code Reviews Require Rocket Science
  • 22. x$objQuery = $this->db->query ( "SELECT rd.*, ((rd.rd_numberofrooms) - (select sum(rn.reservation_numberofrooms) as count_reserve_room from reservation as rn WHERE rn.reservation_rd_id = rd.rd_id AND (str_to_date('$data_Check_in_date','%d-%m-%y') BETWEEN str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date(rn.reservation_check_out_date,'%d-%m- %y') OR str_to_date('$data_Check_out_date','%d-%m- %y') BETWEEN str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date(rn.reservation_check_out_date,'%d-%m- %y') OR str_to_date('$data_Check_in_date','%d-%m- %y') <= str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date('$data_Check_out_date','%d-%m- %y') ) )) as reserve FROM room_details rd LEFT JOIN reservation rn ON rd.rd_id = rn.reservation_rd_id WHERE NOT EXISTS ( SELECT rn.* FROM reservation rn WHERE rn.reservation_rd_id = rd.rd_id AND (str_to_date('$data_Check_in_date','%d-%m-%y') BETWEEN str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date(rn.reservation_check_out_date,'%d-%m- %y') OR str_to_date('$data_Check_out_date','%d-%m- %y') BETWEEN str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date(rn.reservation_check_out_date,'%d-%m- %y') OR str_to_date('$data_Check_in_date','%d-%m- %y') <= str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date('$data_Check_out_date','%d-%m- %y') >= str_to_date(rn.reservation_check_out_date,'%d-%m- %y')) AND (rd.rd_numberofrooms <= (select sum(rn.reservation_numberofrooms) as count_reserve_room from reservation as rn WHERE rn.reservation_rd_id = rd.rd_id AND (str_to_date('$data_Check_in_date','%d-%m-%y') BETWEEN str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date(rn.reservation_check_out_date,'%d-%m- %y') OR str_to_date('$data_Check_out_date','%d-%m- %y') BETWEEN str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date(rn.reservation_check_out_date,'%d-%m- %y') OR str_to_date('$data_Check_in_date','%d-%m- %y') <= str_to_date(rn.reservation_check_in_date,'%d-%m- %y') AND str_to_date('$data_Check_out_date','%d-%m- %y') ) ) ) ) "); www.quora.com/Whats-the-most-complex-SQL-query-you-ever-wrote
  • 24. © 2017 IDERA, Inc. All rights reserved. RAPID RESPONSE: DATABASE DEBUGGING AND PROFILING TO THE RESCUE Bert Scalzo, Senior Product Manager
  • 25. 25© 2017 IDERA, Inc. All rights reserved. PROGRAMMING HISTORY •1951 – Assembly •1952 – Autocode •1954 – IPL •1955 – FLOW-MATIC •1957 – FORTRAN •1957 – COMTRAN •1958 – LISP •1958 – ALGOL 58 •1959 – FACT •1959 – COBOL •1959 – RPG •1962 – APL •1962 – Simula •1962 – SNOBOL •1963 – CPL •1964 – Speakeasy •1964 – BASIC •1964 – PL/I •1966 – JOSS •1967 – BCPL •1968 – Logo •1969 – B •1970 – Pascal •1970 – Forth •1972 – C •1972 – Smalltalk •1972 – Prolog •1973 – ML •1975 – Scheme •1978 – SQL •1980 – C++ •1983 – Ada •1984 – Common Lisp •1984 – MATLAB •1985 – Eiffel •1986 – Objective-C •1986 – Erlang •1987 – Perl •1988 – Tcl •1988 – Wolfram Language •1989 – FL •2000 – ActionScript •2001 – C# •2003 – Groovy •2003 – Scala •2005 – F# •2006 – PowerShell •2007 – Clojure •2009 – Go •2010 – Rust •2011 – Dart •2012 – Julia •2014 – Swift Note this point in history. Can you guess why it’s marked? (session title)
  • 26. 26© 2017 IDERA, Inc. All rights reserved. § Instrumentation / Print Statements / Trace File § Interactive Debugger • First appeared in 1977 • Good for finding logic mistakes (i.e. effectiveness) • Remote Debugging (special case – e.g. database) • Common Terminology • Breakpoints • Watch values • Step into • Step over DEBUGGING
  • 27. 27© 2017 IDERA, Inc. All rights reserved. PROFILING § Sampling / Instruction Set Simulators § Instrumentation / Print Statements / Trace File § Profiler (Dynamic Program Analysis) • First appeared in 1979 • Good for finding resource consumption and performance bottlenecks (i.e. efficiency) • Generally separate & distinct from the debugger • Not generally utilized as often as debuggers
  • 28. 28© 2017 IDERA, Inc. All rights reserved. DB LANGUAGES § Some database vendors offer 3GL languages that “compile code” within the database • Oracle: PL/SQL • SQL Server: Transact-SQL (T-SQL) • SQL-1999: SQL/PSM • PostgreSQL: PL/pgSQL • DB2: SQL PL • Informix: SPL
  • 29. 29© 2017 IDERA, Inc. All rights reserved. DB OBJECTS § What database objects are built using procedural languages? • Triggers • (Stored) Procedures • (Stored) Functions • Packages (Oracle only)
  • 30. 30© 2017 IDERA, Inc. All rights reserved. DEBUGGER EXAMPLE (OLD WAY)
  • 31. 31© 2017 IDERA, Inc. All rights reserved. DEBUGGER EXAMPLE (OLD WAY)
  • 32. 32© 2017 IDERA, Inc. All rights reserved. DEBUGGER EXAMPLE (INTERACTIVE) Hover over variable to see value Stepping cursor a line at a time Setting a breakpoint to run to Local variables autowatched Call stack for all procedural code
  • 33. 33© 2017 IDERA, Inc. All rights reserved. PROFILER EXAMPLE #1 (DEBUGGER) This loop consumed most time, so anything I can do inside it to improve performanceshould pay dividends
  • 34. 34© 2017 IDERA, Inc. All rights reserved. PROFILER EXAMPLE #2 (CODE ANALYST) This loop consumed most time, so anything I can do inside it to improve performanceshould pay dividends
  • 35. 35© 2017 IDERA, Inc. All rights reserved. BUSINESS REQUIREMENTS § Since we write code to perform some task, we must mandatorily perform the task correctly (i.e. effective) • DEBUGGER § Since users are impatient and want the results even before they press the key, or preferably yesterday (i.e. efficient) • PROFILER § Without these tools, we’re shooting blindfolded!
  • 36. 36© 2017 IDERA, Inc. All rights reserved. DEMO Will demonstrate typical database debugger and profiler in a typical database administration and/or development tool like IDERA’s DBArtisan® and Rapid SQL®
  • 37. 37© 2017 IDERA, Inc. All rights reserved. Q&A
  • 38.
  • 39. The Archive Trifecta: • Inside Analysis www.insideanalysis.com • SlideShare www.slideshare.net/InsideAnalysis • YouTube www.youtube.com/user/BloorGroup THANK YOU!