SlideShare a Scribd company logo
1 of 24
Download to read offline
EclipseWorld
               October 28-30, 2008



    Classic Database Development
               Mistakes
               Mi t k
               7
        And Five ways to Overcome them

Scott Walz
Embarcadero Technologies
2




                                                          Agenda
                                                           g

       • Classic DB Development Mistakes

       • Steps to overcome them

       • Questions




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
3




                                                Marketplace
                                                      p
       • Data is growing at mind bending speed
       • The number and diversity of applications is striving to keep
         up with market demand, which is further driving data growth
       • More and more people are needed to manage the data and
         create the applications
             t th        li ti
       • Nearly 16 million application developers today, growing at
         nearly 2 million annually*
       • Time to market, quality, and predictability of software systems
         continues to plague the software industry
       • Customers need tools that address development of the entire
         system



Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
4




                                       Classic Mistakes

       • Rows returned = Success
       • My query is FAST!!
       • M query d
         My       does a l t!
                         lot!




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
5




                                       Classic Mistakes

       • Rows returned = success
               – Sample the results
               – Validate the query by breaking it down
               – Does the row count pass the test?




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
6




                                       Classic Mistakes

       • My query is fast!
               – What is your test data size?
               – Have you explained it?
                      • more later




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
7




                                       Classic Mistakes

       • My query does a lot
               – Is the query too complex
               – Trying to get back too much data
               – Would it serve you better to break it into
                 smaller queries




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
8




                     Overcoming the mistakes
                              g

       •     Explain Plan usage
       •     Index usage
       •     ANSI-92
             ANSI 92 SQL
       •     Reuse, reuse, reuse
       •     Query rewrites
       •     Database Structure
       •     Develop a set of best practices

Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
9




                                     Words of Wisdom
            “Several factors determine how well a query performs, some with
            greater influence th others. Wh you t
                 t i fl        than th      When       tune a d t warehouse, it
                                                              data       h
            makes sense to address the factors of greatest influence before those
            with lesser influence. Often, the factors with greatest influence
            determine performance. When you follow this approach you maximize
                        performance                          approach,
            the payoff (better query performance) and minimize the effort.
            Simply put, this approach takes advantage of the 80/20 rule (law of
            diminishing returns) which says that eighty percent of the benefits come
            from twenty percent of the effort. If you know what falls into the twenty
            percent, take advantage of this knowledge and save yourself a lot of
            effort ”1
            effort.



     1IBM   Software Information Center www.ibm.com


Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
10




                                 Explain Plan Usage
                                   p             g
       • Your window into the database
       • The last thing executed before moving the
         SQL statement off of your desk.




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
11




                                  Explan Plan Usage
                                    p            g
    Looking for Index Usage




                           Determine the Cost




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
12




                                                Index Usage
                                                         g

       • Dramatic performance improvements
       • Remember, too many may not be good.




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
13




                                                Index usage
                                                         g


                                                                    Cost = 0




                                                                     Cost = 3




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
14




                                             Syntax Issues
                                              y
   • Null Operators




     •Sbtf
      Substr functions
                 ti




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
15




                                             Syntax Issues
                                              y
   • Functions suppress index usage




  •I
   Incompatible d t t
          tibl datatypes suppress i d usage
                                  index




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
16




                                             Syntax Issues
                                              y
   • Massaging the query




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
17




                            Using ANSI-92 Syntax
                                g          y

       • Easier to read
       • More companies are standardizing on it




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
18




                                              Non ANSI-92




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
19




                                              ANSI-92 SQL




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
20




                            Reuse, Reuse, Reuse
                                 ,      ,

       • Take advantage of
               – Stored Procedures
               – Triggers
               – Packages




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
21




                                          Query Rewrites
                                              y

       • There is more than one way to write the
         query
               – Change the order of the where clause
               – Use sub-selects in the place of sub-queries




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
22




                                  Database Structure

       • Could a View be a better option
               – If the same tables are queried often w/
                 changing fields being returned
               – A complex query can be optimized once and
                 a view created based on the query.
               – Oftentimes is not a developer option.
                      • Can be sugges ed, bu normally a DBA ac
                        Ca     suggested, but o a y         activity.
                                                                   y




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
23




                                            Best Practices




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
24




                                                         Questions


                                                             (shameless plug)


                                     www.embarcadero.com
                                     www embarcadero com




Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0

More Related Content

Viewers also liked

PL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read WorldPL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read WorldMichael Rosenblum
 
A New View of Database Views
A New View of Database ViewsA New View of Database Views
A New View of Database ViewsMichael Rosenblum
 
A green solution to solve a race condition problem
A green solution to solve a race condition problemA green solution to solve a race condition problem
A green solution to solve a race condition problemKai Zhou
 
Generic collection types in PLSQL
Generic collection types in PLSQLGeneric collection types in PLSQL
Generic collection types in PLSQLArnold Reuser
 
Striving for Perfection: The Ultimate APEX Application Architecture
Striving for Perfection: The Ultimate APEX Application ArchitectureStriving for Perfection: The Ultimate APEX Application Architecture
Striving for Perfection: The Ultimate APEX Application ArchitectureRoel Hartman
 
utPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQLutPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQLSteven Feuerstein
 
Oracle PL/SQL Bulk binds
Oracle PL/SQL Bulk bindsOracle PL/SQL Bulk binds
Oracle PL/SQL Bulk bindsScott Wesley
 
Oracle 11g PL/SQL notes
Oracle 11g PL/SQL notesOracle 11g PL/SQL notes
Oracle 11g PL/SQL notesanilakduygu
 
Take Full Advantage of the Oracle PL/SQL Compiler
Take Full Advantage of the Oracle PL/SQL CompilerTake Full Advantage of the Oracle PL/SQL Compiler
Take Full Advantage of the Oracle PL/SQL CompilerSteven Feuerstein
 
PL/SQL Code for Sample Projects
PL/SQL Code for Sample ProjectsPL/SQL Code for Sample Projects
PL/SQL Code for Sample Projectsjwjablonski
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals INick Buytaert
 
Prozess-Skript 2.0 D
Prozess-Skript 2.0 DProzess-Skript 2.0 D
Prozess-Skript 2.0 DWandelBarCamp
 
Heroes of Leadership (BetaCodex14)
Heroes of Leadership (BetaCodex14)Heroes of Leadership (BetaCodex14)
Heroes of Leadership (BetaCodex14)Niels Pflaeging
 

Viewers also liked (16)

PL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read WorldPL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read World
 
A New View of Database Views
A New View of Database ViewsA New View of Database Views
A New View of Database Views
 
Makigami
MakigamiMakigami
Makigami
 
A green solution to solve a race condition problem
A green solution to solve a race condition problemA green solution to solve a race condition problem
A green solution to solve a race condition problem
 
PLSQL Advanced
PLSQL AdvancedPLSQL Advanced
PLSQL Advanced
 
Generic collection types in PLSQL
Generic collection types in PLSQLGeneric collection types in PLSQL
Generic collection types in PLSQL
 
Striving for Perfection: The Ultimate APEX Application Architecture
Striving for Perfection: The Ultimate APEX Application ArchitectureStriving for Perfection: The Ultimate APEX Application Architecture
Striving for Perfection: The Ultimate APEX Application Architecture
 
utPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQLutPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQL
 
Oracle PL/SQL Bulk binds
Oracle PL/SQL Bulk bindsOracle PL/SQL Bulk binds
Oracle PL/SQL Bulk binds
 
Oracle 11g PL/SQL notes
Oracle 11g PL/SQL notesOracle 11g PL/SQL notes
Oracle 11g PL/SQL notes
 
Take Full Advantage of the Oracle PL/SQL Compiler
Take Full Advantage of the Oracle PL/SQL CompilerTake Full Advantage of the Oracle PL/SQL Compiler
Take Full Advantage of the Oracle PL/SQL Compiler
 
PL/SQL Code for Sample Projects
PL/SQL Code for Sample ProjectsPL/SQL Code for Sample Projects
PL/SQL Code for Sample Projects
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
 
Best sql plsql material
Best sql plsql materialBest sql plsql material
Best sql plsql material
 
Prozess-Skript 2.0 D
Prozess-Skript 2.0 DProzess-Skript 2.0 D
Prozess-Skript 2.0 D
 
Heroes of Leadership (BetaCodex14)
Heroes of Leadership (BetaCodex14)Heroes of Leadership (BetaCodex14)
Heroes of Leadership (BetaCodex14)
 

Similar to Database Development Mistakes

Brian Oliver Pimp My Data Grid
Brian Oliver  Pimp My Data GridBrian Oliver  Pimp My Data Grid
Brian Oliver Pimp My Data Griddeimos
 
Internet World Web2
Internet World Web2Internet World Web2
Internet World Web2BobsNJ
 
Value Of Cloud Computing For Fed Governmen Oct 8 Tim May
Value Of Cloud Computing For Fed Governmen Oct 8 Tim MayValue Of Cloud Computing For Fed Governmen Oct 8 Tim May
Value Of Cloud Computing For Fed Governmen Oct 8 Tim MayGovCloud Network
 
Oracle database performance monitoring diagnosis and reporting with EG Innova...
Oracle database performance monitoring diagnosis and reporting with EG Innova...Oracle database performance monitoring diagnosis and reporting with EG Innova...
Oracle database performance monitoring diagnosis and reporting with EG Innova...eG Innovations
 
Egl Rui Ajax World
Egl Rui Ajax WorldEgl Rui Ajax World
Egl Rui Ajax Worldrajivmordani
 
PL/SQL Development
PL/SQL DevelopmentPL/SQL Development
PL/SQL DevelopmentThanh Nguyen
 
Eventum Presentation
Eventum PresentationEventum Presentation
Eventum Presentationjoaopmaia
 
Deploying in the Cloud: Why and How
Deploying in the Cloud: Why and HowDeploying in the Cloud: Why and How
Deploying in the Cloud: Why and HowMatt Small
 
Schneider Electric Scada Global Support Provides Troubleshooting and Technica...
Schneider Electric Scada Global Support Provides Troubleshooting and Technica...Schneider Electric Scada Global Support Provides Troubleshooting and Technica...
Schneider Electric Scada Global Support Provides Troubleshooting and Technica...Preeya Selvarajah
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise ApplicationsDaniel Oh
 
My Web Performance Dirty Secrets
My Web Performance Dirty SecretsMy Web Performance Dirty Secrets
My Web Performance Dirty SecretsFred Beringer
 
Tricks And Tradeoffs Of Deploying My Sql Clusters In The Cloud
Tricks And Tradeoffs Of Deploying My Sql Clusters In The CloudTricks And Tradeoffs Of Deploying My Sql Clusters In The Cloud
Tricks And Tradeoffs Of Deploying My Sql Clusters In The CloudMySQLConference
 
High Performance Php My Sql Scaling Techniques
High Performance Php My Sql Scaling TechniquesHigh Performance Php My Sql Scaling Techniques
High Performance Php My Sql Scaling TechniquesZendCon
 
Pstrong Cybera 29 Sept 2008
Pstrong Cybera 29 Sept 2008Pstrong Cybera 29 Sept 2008
Pstrong Cybera 29 Sept 2008Cybera Inc.
 
PCDW For Owners
PCDW For OwnersPCDW For Owners
PCDW For Ownerscbrandon
 
Reviewed Actminds Presentation Jul2007
Reviewed  Actminds  Presentation Jul2007Reviewed  Actminds  Presentation Jul2007
Reviewed Actminds Presentation Jul2007Actminds
 

Similar to Database Development Mistakes (20)

Brian Oliver Pimp My Data Grid
Brian Oliver  Pimp My Data GridBrian Oliver  Pimp My Data Grid
Brian Oliver Pimp My Data Grid
 
XS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM EnglishXS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM English
 
Internet World Web2
Internet World Web2Internet World Web2
Internet World Web2
 
Value Of Cloud Computing For Fed Governmen Oct 8 Tim May
Value Of Cloud Computing For Fed Governmen Oct 8 Tim MayValue Of Cloud Computing For Fed Governmen Oct 8 Tim May
Value Of Cloud Computing For Fed Governmen Oct 8 Tim May
 
Oracle database performance monitoring diagnosis and reporting with EG Innova...
Oracle database performance monitoring diagnosis and reporting with EG Innova...Oracle database performance monitoring diagnosis and reporting with EG Innova...
Oracle database performance monitoring diagnosis and reporting with EG Innova...
 
Egl Rui Ajax World
Egl Rui Ajax WorldEgl Rui Ajax World
Egl Rui Ajax World
 
MySQL Aquarium Paris
MySQL Aquarium ParisMySQL Aquarium Paris
MySQL Aquarium Paris
 
PL/SQL Development
PL/SQL DevelopmentPL/SQL Development
PL/SQL Development
 
Eventum Presentation
Eventum PresentationEventum Presentation
Eventum Presentation
 
Deploying in the Cloud: Why and How
Deploying in the Cloud: Why and HowDeploying in the Cloud: Why and How
Deploying in the Cloud: Why and How
 
Schneider Electric Scada Global Support Provides Troubleshooting and Technica...
Schneider Electric Scada Global Support Provides Troubleshooting and Technica...Schneider Electric Scada Global Support Provides Troubleshooting and Technica...
Schneider Electric Scada Global Support Provides Troubleshooting and Technica...
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
 
My Web Performance Dirty Secrets
My Web Performance Dirty SecretsMy Web Performance Dirty Secrets
My Web Performance Dirty Secrets
 
Cloudy Ajax 08 10
Cloudy Ajax 08 10Cloudy Ajax 08 10
Cloudy Ajax 08 10
 
Tricks And Tradeoffs Of Deploying My Sql Clusters In The Cloud
Tricks And Tradeoffs Of Deploying My Sql Clusters In The CloudTricks And Tradeoffs Of Deploying My Sql Clusters In The Cloud
Tricks And Tradeoffs Of Deploying My Sql Clusters In The Cloud
 
High Performance Php My Sql Scaling Techniques
High Performance Php My Sql Scaling TechniquesHigh Performance Php My Sql Scaling Techniques
High Performance Php My Sql Scaling Techniques
 
Pstrong Cybera 29 Sept 2008
Pstrong Cybera 29 Sept 2008Pstrong Cybera 29 Sept 2008
Pstrong Cybera 29 Sept 2008
 
PCDW For Owners
PCDW For OwnersPCDW For Owners
PCDW For Owners
 
Introducing CQ 5.1
Introducing CQ 5.1Introducing CQ 5.1
Introducing CQ 5.1
 
Reviewed Actminds Presentation Jul2007
Reviewed  Actminds  Presentation Jul2007Reviewed  Actminds  Presentation Jul2007
Reviewed Actminds Presentation Jul2007
 

More from Michael Findling

Senior Marketing Manager: Channels & Strategic accounts
Senior Marketing Manager:  Channels & Strategic accountsSenior Marketing Manager:  Channels & Strategic accounts
Senior Marketing Manager: Channels & Strategic accountsMichael Findling
 
Spark Job Description: Development Director
Spark Job Description: Development DirectorSpark Job Description: Development Director
Spark Job Description: Development DirectorMichael Findling
 
100 Things to Watch in 2011 from JWT
100 Things to Watch in 2011 from JWT100 Things to Watch in 2011 from JWT
100 Things to Watch in 2011 from JWTMichael Findling
 
Social Media Marketing Metrics That Matter
Social Media Marketing Metrics That MatterSocial Media Marketing Metrics That Matter
Social Media Marketing Metrics That MatterMichael Findling
 
Tutorpedia Foundation Silent Auction Item List – February 23, 2011
Tutorpedia Foundation Silent Auction Item List – February 23, 2011Tutorpedia Foundation Silent Auction Item List – February 23, 2011
Tutorpedia Foundation Silent Auction Item List – February 23, 2011Michael Findling
 
Website Marketing Seminar 2009
Website Marketing Seminar 2009Website Marketing Seminar 2009
Website Marketing Seminar 2009Michael Findling
 
Reducing Total Cost of Ownership for Database and Developer Software
Reducing Total Cost of Ownership for Database and Developer SoftwareReducing Total Cost of Ownership for Database and Developer Software
Reducing Total Cost of Ownership for Database and Developer SoftwareMichael Findling
 
Performance Optimization: Incorporating Database and Code Optimzitation Into ...
Performance Optimization: Incorporating Database and Code Optimzitation Into ...Performance Optimization: Incorporating Database and Code Optimzitation Into ...
Performance Optimization: Incorporating Database and Code Optimzitation Into ...Michael Findling
 
Reasons to migrate from Delphi 7 to Delphi 2009
Reasons to migrate from Delphi 7  to Delphi 2009Reasons to migrate from Delphi 7  to Delphi 2009
Reasons to migrate from Delphi 7 to Delphi 2009Michael Findling
 
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/StudioMigrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/StudioMichael Findling
 
Java Optimization For Faster Code & Better Results | J Optimizer
Java Optimization For Faster Code & Better Results | J OptimizerJava Optimization For Faster Code & Better Results | J Optimizer
Java Optimization For Faster Code & Better Results | J OptimizerMichael Findling
 
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio®
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio®Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio®
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio®Michael Findling
 
Top Ten Reasons to Upgrade from Delphi 7
Top Ten Reasons to Upgrade from Delphi 7Top Ten Reasons to Upgrade from Delphi 7
Top Ten Reasons to Upgrade from Delphi 7Michael Findling
 
Database Tools and Developer Software Licence Management
Database Tools and Developer Software Licence ManagementDatabase Tools and Developer Software Licence Management
Database Tools and Developer Software Licence ManagementMichael Findling
 
Database Design and Data Modeling | PowerDesigner to All Access
Database Design and Data Modeling | PowerDesigner to All AccessDatabase Design and Data Modeling | PowerDesigner to All Access
Database Design and Data Modeling | PowerDesigner to All AccessMichael Findling
 
Preventing Database Perfomance Issues | DB Optimizer
Preventing Database Perfomance Issues | DB OptimizerPreventing Database Perfomance Issues | DB Optimizer
Preventing Database Perfomance Issues | DB OptimizerMichael Findling
 
Build Windows Applications Fast | Delphi Prism
Build Windows Applications Fast | Delphi PrismBuild Windows Applications Fast | Delphi Prism
Build Windows Applications Fast | Delphi PrismMichael Findling
 
Develop Enterprise Java Applications | JBuilder
Develop Enterprise Java Applications | JBuilderDevelop Enterprise Java Applications | JBuilder
Develop Enterprise Java Applications | JBuilderMichael Findling
 
Develop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyDevelop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyMichael Findling
 
Develop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyDevelop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyMichael Findling
 

More from Michael Findling (20)

Senior Marketing Manager: Channels & Strategic accounts
Senior Marketing Manager:  Channels & Strategic accountsSenior Marketing Manager:  Channels & Strategic accounts
Senior Marketing Manager: Channels & Strategic accounts
 
Spark Job Description: Development Director
Spark Job Description: Development DirectorSpark Job Description: Development Director
Spark Job Description: Development Director
 
100 Things to Watch in 2011 from JWT
100 Things to Watch in 2011 from JWT100 Things to Watch in 2011 from JWT
100 Things to Watch in 2011 from JWT
 
Social Media Marketing Metrics That Matter
Social Media Marketing Metrics That MatterSocial Media Marketing Metrics That Matter
Social Media Marketing Metrics That Matter
 
Tutorpedia Foundation Silent Auction Item List – February 23, 2011
Tutorpedia Foundation Silent Auction Item List – February 23, 2011Tutorpedia Foundation Silent Auction Item List – February 23, 2011
Tutorpedia Foundation Silent Auction Item List – February 23, 2011
 
Website Marketing Seminar 2009
Website Marketing Seminar 2009Website Marketing Seminar 2009
Website Marketing Seminar 2009
 
Reducing Total Cost of Ownership for Database and Developer Software
Reducing Total Cost of Ownership for Database and Developer SoftwareReducing Total Cost of Ownership for Database and Developer Software
Reducing Total Cost of Ownership for Database and Developer Software
 
Performance Optimization: Incorporating Database and Code Optimzitation Into ...
Performance Optimization: Incorporating Database and Code Optimzitation Into ...Performance Optimization: Incorporating Database and Code Optimzitation Into ...
Performance Optimization: Incorporating Database and Code Optimzitation Into ...
 
Reasons to migrate from Delphi 7 to Delphi 2009
Reasons to migrate from Delphi 7  to Delphi 2009Reasons to migrate from Delphi 7  to Delphi 2009
Reasons to migrate from Delphi 7 to Delphi 2009
 
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/StudioMigrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio
 
Java Optimization For Faster Code & Better Results | J Optimizer
Java Optimization For Faster Code & Better Results | J OptimizerJava Optimization For Faster Code & Better Results | J Optimizer
Java Optimization For Faster Code & Better Results | J Optimizer
 
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio®
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio®Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio®
Migrating from CA AllFusionTM ERwin® Data Modeler to ER/Studio®
 
Top Ten Reasons to Upgrade from Delphi 7
Top Ten Reasons to Upgrade from Delphi 7Top Ten Reasons to Upgrade from Delphi 7
Top Ten Reasons to Upgrade from Delphi 7
 
Database Tools and Developer Software Licence Management
Database Tools and Developer Software Licence ManagementDatabase Tools and Developer Software Licence Management
Database Tools and Developer Software Licence Management
 
Database Design and Data Modeling | PowerDesigner to All Access
Database Design and Data Modeling | PowerDesigner to All AccessDatabase Design and Data Modeling | PowerDesigner to All Access
Database Design and Data Modeling | PowerDesigner to All Access
 
Preventing Database Perfomance Issues | DB Optimizer
Preventing Database Perfomance Issues | DB OptimizerPreventing Database Perfomance Issues | DB Optimizer
Preventing Database Perfomance Issues | DB Optimizer
 
Build Windows Applications Fast | Delphi Prism
Build Windows Applications Fast | Delphi PrismBuild Windows Applications Fast | Delphi Prism
Build Windows Applications Fast | Delphi Prism
 
Develop Enterprise Java Applications | JBuilder
Develop Enterprise Java Applications | JBuilderDevelop Enterprise Java Applications | JBuilder
Develop Enterprise Java Applications | JBuilder
 
Develop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyDevelop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRuby
 
Develop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyDevelop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRuby
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 
"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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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!
 
"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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
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.
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Database Development Mistakes

  • 1. EclipseWorld October 28-30, 2008 Classic Database Development Mistakes Mi t k 7 And Five ways to Overcome them Scott Walz Embarcadero Technologies
  • 2. 2 Agenda g • Classic DB Development Mistakes • Steps to overcome them • Questions Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 3. 3 Marketplace p • Data is growing at mind bending speed • The number and diversity of applications is striving to keep up with market demand, which is further driving data growth • More and more people are needed to manage the data and create the applications t th li ti • Nearly 16 million application developers today, growing at nearly 2 million annually* • Time to market, quality, and predictability of software systems continues to plague the software industry • Customers need tools that address development of the entire system Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 4. 4 Classic Mistakes • Rows returned = Success • My query is FAST!! • M query d My does a l t! lot! Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 5. 5 Classic Mistakes • Rows returned = success – Sample the results – Validate the query by breaking it down – Does the row count pass the test? Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 6. 6 Classic Mistakes • My query is fast! – What is your test data size? – Have you explained it? • more later Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 7. 7 Classic Mistakes • My query does a lot – Is the query too complex – Trying to get back too much data – Would it serve you better to break it into smaller queries Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 8. 8 Overcoming the mistakes g • Explain Plan usage • Index usage • ANSI-92 ANSI 92 SQL • Reuse, reuse, reuse • Query rewrites • Database Structure • Develop a set of best practices Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 9. 9 Words of Wisdom “Several factors determine how well a query performs, some with greater influence th others. Wh you t t i fl than th When tune a d t warehouse, it data h makes sense to address the factors of greatest influence before those with lesser influence. Often, the factors with greatest influence determine performance. When you follow this approach you maximize performance approach, the payoff (better query performance) and minimize the effort. Simply put, this approach takes advantage of the 80/20 rule (law of diminishing returns) which says that eighty percent of the benefits come from twenty percent of the effort. If you know what falls into the twenty percent, take advantage of this knowledge and save yourself a lot of effort ”1 effort. 1IBM Software Information Center www.ibm.com Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 10. 10 Explain Plan Usage p g • Your window into the database • The last thing executed before moving the SQL statement off of your desk. Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 11. 11 Explan Plan Usage p g Looking for Index Usage Determine the Cost Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 12. 12 Index Usage g • Dramatic performance improvements • Remember, too many may not be good. Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 13. 13 Index usage g Cost = 0 Cost = 3 Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 14. 14 Syntax Issues y • Null Operators •Sbtf Substr functions ti Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 15. 15 Syntax Issues y • Functions suppress index usage •I Incompatible d t t tibl datatypes suppress i d usage index Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 16. 16 Syntax Issues y • Massaging the query Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 17. 17 Using ANSI-92 Syntax g y • Easier to read • More companies are standardizing on it Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 18. 18 Non ANSI-92 Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 19. 19 ANSI-92 SQL Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 20. 20 Reuse, Reuse, Reuse , , • Take advantage of – Stored Procedures – Triggers – Packages Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 21. 21 Query Rewrites y • There is more than one way to write the query – Change the order of the where clause – Use sub-selects in the place of sub-queries Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 22. 22 Database Structure • Could a View be a better option – If the same tables are queried often w/ changing fields being returned – A complex query can be optimized once and a view created based on the query. – Oftentimes is not a developer option. • Can be sugges ed, bu normally a DBA ac Ca suggested, but o a y activity. y Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 23. 23 Best Practices Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0
  • 24. 24 Questions (shameless plug) www.embarcadero.com www embarcadero com Classic Database Development Mistakes | © 2008 by Scott Walz – Embarcadero Technologies; made available under the EPL v1.0