SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
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!

Contenu connexe

En vedette

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 WorldEric 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 LakeEric 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 EnterpriseEric 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 EnterpriseEric Kavanagh
 
SQL 脳から見た Ruby
SQL 脳から見た RubySQL 脳から見た Ruby
SQL 脳から見た Rubyyancya
 
紹介 of Anemometer
紹介 of Anemometer紹介 of Anemometer
紹介 of Anemometeryoku0825
 
地雷職人の朝は早い
地雷職人の朝は早い地雷職人の朝は早い
地雷職人の朝は早い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の次のMySQLyoku0825
 
ペパボ de MySQL
ペパボ de MySQLペパボ de MySQL
ペパボ de MySQLyoku0825
 
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 MySQLyoku0825
 

En vedette (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
 

Similaire à Rapid debugging and profiling for database issues

Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf ToolsRaj Pandey
 
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 #1Jay 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 LinkersChing-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 Scienceaturley_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 finalDileep Bhandarkar
 
Getting Started with Hadoop
Getting Started with HadoopGetting Started with Hadoop
Getting Started with HadoopJosh 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 ScholarshipDavid De Roure
 
BSA Programming Merit Badge STEM
BSA Programming Merit Badge STEMBSA Programming Merit Badge STEM
BSA Programming Merit Badge STEMEric Silva
 
designpatterns_blair_upe.ppt
designpatterns_blair_upe.pptdesignpatterns_blair_upe.ppt
designpatterns_blair_upe.pptbanti43
 

Similaire à Rapid debugging and profiling for database issues (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
 

Plus de 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 IntegrationEric 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 PipelinesEric 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 AnalysisEric Kavanagh
 
Will AI Eliminate Reports and Dashboards
Will AI Eliminate Reports and DashboardsWill AI Eliminate Reports and Dashboards
Will AI Eliminate Reports and DashboardsEric 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 ModernizationEric Kavanagh
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database RoundtableEric Kavanagh
 
Database Survival Guide: Exploratory Webcast
Database Survival Guide: Exploratory WebcastDatabase Survival Guide: Exploratory Webcast
Database Survival Guide: Exploratory WebcastEric 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 SecurityEric 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 GovernanceEric 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 ForecastingEric 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 EconomyEric 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 MatterEric 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 IoTEric Kavanagh
 
Beyond the Platform: Enabling Fluid Analysis
Beyond the Platform: Enabling Fluid AnalysisBeyond the Platform: Enabling Fluid Analysis
Beyond the Platform: Enabling Fluid AnalysisEric 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 DataEric 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 DataEric 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 QueriesEric 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 NowEric 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 PlatformEric Kavanagh
 

Plus de 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
 

Dernier

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Rapid debugging and profiling for database issues

  • 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!