SlideShare una empresa de Scribd logo
1 de 64
Performance by Design Guy Harrison Director, R&D Melbourne www.guyharrison.net
Introductions
Save the red-shirt Toad! The Red-shirt Toad is NOT expendable!
Core message Design limits performance Architecture maps requirements to design Make sure performance requirements are specified Make sure architecture allows for performance Make sure performance requirements are realized
Elements of Performance by Design
Methodology
High performance can mean different things Speed: response time
Efficiency: power consumption
Power: throughput
Not usually easy to change architectures
Poorly defined requirements lead to this:
The twitter lesson
Twitter growth
“Twitter is, fundamentally, a messaging system. Twitter was not architected as a messaging system, however. For expediency's sake, Twitter was built with technologies and practices that are more appropriate to a content management system.”
Patterns of database performance Hard to distinguish patterns at low levels
Validating performance can’t wait... User adoption and growth UI Layer (HTML, JavaScript, Ajax)  Middleware layer (J2EE) SQLs Database (Tables, views, partitions, etc)
Database Design
Normalize, but not too far!
Other logical design thoughts Artificial keys Generally more efficient than long composite keys Null values Not a good idea if you intend to search for “unknown” or “incomplete” values Null should not mean something But beneficial as long as you don’t need to look for them.  Data types Constraints on precision can sometimes reduce row lengths Variable length strings usually better Carefully consider CLOBs vs long VARCHARs
Logical to Physical: Subtypes “Customers are people too”
Indexing, clustering and weird table types Lots’ of options: B*-Tree index Bitmap index Hash cluster Index Cluster Nested table Index Organized Table Most often useful: B*-Tree (concatenated) indexes Bitmap indexes Hash Clusters
Concatenated index effectiveness SELECT cust_id FROM sh.customers c WHERE cust_first_name = 'Connor' AND cust_last_name = 'Bishop' AND cust_year_of_birth = 1976;
Concatenated indexing guidleines Create a concatenated index for columns from a table that appear together in the WHERE clause. If columns sometimes appear on their own in a WHERE clause, place them at the start of the index. The more selective a column is, the more useful it will be at the leading end of the index (better single key lookups) But indexes compress better when the leading columns are less selective. (better scans)  Index skip scans can make use of an index even if the leading columns are not specified, but it’s a poor second choice to a “normal” index range scan.
Bitmap indexes
Bitmap indexes
Bitmap join performance  SELECT SUM (amount_sold) FROM customers JOIN sales s USING (cust_id) WHERE cust_email='flint.jeffreys@company2.com';
Index overhead
Hash Cluster Cluster key determines physical location on disk Single IO lookup by cluster key Misconfiguration leads to overflow or sparse tables
Hash Cluster vs B-tree index
Hash cluster table scan
Denormalization and partitioning Repeating groups – VARRAYS, nested tables Summary tables – Materialized Views, Result cache Horizontal partitioning – Oracle Partition Option  In-line aggregations – Dimensions  Derived columns – Virtual columns Vertical partitioning  Replicated columns - triggers
Summary tables Aggregate queries on big tables often the most expensive Pre-computing them makes a lot of sense Balance accuracy with overhead  Aggregate Query MV on COMMIT Manual Summary Result set cache MV stale tolerated  Accuracy Efficiency
Vertical partitioning
Physical storage options LOB Storage PCTFREE Compression  Block size  Partitioning
Application Architecture and implementation
The best SQL is no SQL  Avoid asking for the same data twice.
11g client side cache  CLIENT_RESULT_CACHE_SIZE: this is the amount of memory each client program will dedicate to the cache. Use RESULT_CACHE hint or (11GR2) table property Optionally set the CLIENT_RESULT_CACHE_LAG
Parse overhead It’s easy enough in most programming languages to create a unique SQL for every query:
Bind variables are preferred
Parse overhead reduction
Identifying similar SQLs See force_matching.sql at www.guyharrison.net
Transaction design  Optimistic vs. Pessimistic
Using ORA_ROWSCN Setting ROWDEPENDENCIES will reduce false fails
Network – stored procedures
Network traffic example
Array processing - Fetch
Network overhead – Array processing
Array Insert (Java)
Array Insert: (.NET)
Array Insert – PL/SQL
Thank you
Geek quiz stuff: High probability answers (keep standing if): Know what Alice and Wally have in common You know the next number in this series 3 . 1 4    Know what “M” is in E=MC2
Know (or can work out)  your age in hex Have an opinion  about  of ST  vs SW  If you know who Leonard McCoy is  Think there is an important distinction between Nerd and Geek  Can quote  Monty Python  …. Other than dead parrot? You’ve ever  watched Jerry Springer
There are more networked devices in your house than people, pets and cars Know the names of two of Thomas the tank engines friends Know the names of any of Angelina and Brad’s babies Low probability answers: (sit down if you): Have a twitter account  # Azure is your new favourite color
You’ve ever played Zork You have a favourite Dr Who companion  Your favourite is  Sarah Jane    Know your age in binary (or can work it out in your head)  You are proficient in some form of assembler
# You are proficient in some for or English  There is a rubicks cube in your house  Have your own domain Have ever been to Azeroth Who is  Know who said “Dude I am not your nemesis”
Worn a star trek or star wars costume Played a game that uses a non-six  sided dice Get email on my phone – before getting out of bed Calculator watch Binary time piece  Was on the internet prior to the WWW
# Met my current partner on line Know the next thing in this sequence:  Hydrogen, Helium, Lithuim, Berilium, …. Know what a Gigaquads in a megaquad is
Saw a sci-fi movie more than twice at the movies ========================================================= You cleaned up at home before going to work

Más contenido relacionado

Destacado

Lesson 05 Three Course Requirements
Lesson 05 Three Course RequirementsLesson 05 Three Course Requirements
Lesson 05 Three Course RequirementsJim Jansen
 
Big datacamp2013 share
Big datacamp2013 shareBig datacamp2013 share
Big datacamp2013 shareGuy Harrison
 
Stormwater Management Using State Revolving Funds
Stormwater Management Using State Revolving FundsStormwater Management Using State Revolving Funds
Stormwater Management Using State Revolving FundsOHM Advisors
 
Regulatory, Technical and Modeling Challenges to Developing a Frequency Based...
Regulatory, Technical and Modeling Challenges to Developing a Frequency Based...Regulatory, Technical and Modeling Challenges to Developing a Frequency Based...
Regulatory, Technical and Modeling Challenges to Developing a Frequency Based...OHM Advisors
 
Performance is the new normal 20120426-preso
Performance is the new normal 20120426-presoPerformance is the new normal 20120426-preso
Performance is the new normal 20120426-presoPERFORMENSATION
 
Raising A Child With A Chronic Illness
Raising A  Child With A Chronic IllnessRaising A  Child With A Chronic Illness
Raising A Child With A Chronic IllnessSheri Turner
 
STEM in Motion - BASA Conference
STEM in Motion - BASA ConferenceSTEM in Motion - BASA Conference
STEM in Motion - BASA ConferenceOHM Advisors
 
照片掃描系統
照片掃描系統照片掃描系統
照片掃描系統wu rong-feng
 
Municipal Infrastructure: Managing Assets to Capital Improvement Plans
Municipal Infrastructure: Managing Assets to Capital Improvement PlansMunicipal Infrastructure: Managing Assets to Capital Improvement Plans
Municipal Infrastructure: Managing Assets to Capital Improvement PlansOHM Advisors
 
Hadoop, Oracle and the big data revolution collaborate 2013
Hadoop, Oracle and the big data revolution collaborate 2013Hadoop, Oracle and the big data revolution collaborate 2013
Hadoop, Oracle and the big data revolution collaborate 2013Guy Harrison
 
Internal Search - The Lost Child of Web Analytics
Internal Search - The Lost Child of Web AnalyticsInternal Search - The Lost Child of Web Analytics
Internal Search - The Lost Child of Web AnalyticsCharles Meaden
 
Profiling a Person With Search Log Data
Profiling a Person With Search Log DataProfiling a Person With Search Log Data
Profiling a Person With Search Log DataJim Jansen
 
Stormwater Utilities: A regional and national perspective on planning and imp...
Stormwater Utilities: A regional and national perspective on planning and imp...Stormwater Utilities: A regional and national perspective on planning and imp...
Stormwater Utilities: A regional and national perspective on planning and imp...OHM Advisors
 
Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog 2 - Let the Comments be your Content!Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog 2 - Let the Comments be your Content!Brendan Sera-Shriar
 
Ket Qua Xet Tuyen Lop 6
Ket Qua Xet Tuyen Lop 6Ket Qua Xet Tuyen Lop 6
Ket Qua Xet Tuyen Lop 6guestd9ddd7b
 
Twitter and EWOM Branding
Twitter and EWOM BrandingTwitter and EWOM Branding
Twitter and EWOM BrandingJim Jansen
 
Expressionism (final version)
Expressionism (final version)Expressionism (final version)
Expressionism (final version)Patricia Guzman
 
Supplemental Info: Say on Pay and Dodd Frank 20100723
Supplemental Info: Say on Pay and Dodd Frank 20100723Supplemental Info: Say on Pay and Dodd Frank 20100723
Supplemental Info: Say on Pay and Dodd Frank 20100723PERFORMENSATION
 
Anais
AnaisAnais
Anaisunama
 

Destacado (20)

Lesson 05 Three Course Requirements
Lesson 05 Three Course RequirementsLesson 05 Three Course Requirements
Lesson 05 Three Course Requirements
 
Big datacamp2013 share
Big datacamp2013 shareBig datacamp2013 share
Big datacamp2013 share
 
Stormwater Management Using State Revolving Funds
Stormwater Management Using State Revolving FundsStormwater Management Using State Revolving Funds
Stormwater Management Using State Revolving Funds
 
Regulatory, Technical and Modeling Challenges to Developing a Frequency Based...
Regulatory, Technical and Modeling Challenges to Developing a Frequency Based...Regulatory, Technical and Modeling Challenges to Developing a Frequency Based...
Regulatory, Technical and Modeling Challenges to Developing a Frequency Based...
 
Performance is the new normal 20120426-preso
Performance is the new normal 20120426-presoPerformance is the new normal 20120426-preso
Performance is the new normal 20120426-preso
 
Raising A Child With A Chronic Illness
Raising A  Child With A Chronic IllnessRaising A  Child With A Chronic Illness
Raising A Child With A Chronic Illness
 
STEM in Motion - BASA Conference
STEM in Motion - BASA ConferenceSTEM in Motion - BASA Conference
STEM in Motion - BASA Conference
 
照片掃描系統
照片掃描系統照片掃描系統
照片掃描系統
 
Municipal Infrastructure: Managing Assets to Capital Improvement Plans
Municipal Infrastructure: Managing Assets to Capital Improvement PlansMunicipal Infrastructure: Managing Assets to Capital Improvement Plans
Municipal Infrastructure: Managing Assets to Capital Improvement Plans
 
Hadoop, Oracle and the big data revolution collaborate 2013
Hadoop, Oracle and the big data revolution collaborate 2013Hadoop, Oracle and the big data revolution collaborate 2013
Hadoop, Oracle and the big data revolution collaborate 2013
 
Internal Search - The Lost Child of Web Analytics
Internal Search - The Lost Child of Web AnalyticsInternal Search - The Lost Child of Web Analytics
Internal Search - The Lost Child of Web Analytics
 
Profiling a Person With Search Log Data
Profiling a Person With Search Log DataProfiling a Person With Search Log Data
Profiling a Person With Search Log Data
 
Stormwater Utilities: A regional and national perspective on planning and imp...
Stormwater Utilities: A regional and national perspective on planning and imp...Stormwater Utilities: A regional and national perspective on planning and imp...
Stormwater Utilities: A regional and national perspective on planning and imp...
 
Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog 2 - Let the Comments be your Content!Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog 2 - Let the Comments be your Content!
 
Ket Qua Xet Tuyen Lop 6
Ket Qua Xet Tuyen Lop 6Ket Qua Xet Tuyen Lop 6
Ket Qua Xet Tuyen Lop 6
 
Twitter and EWOM Branding
Twitter and EWOM BrandingTwitter and EWOM Branding
Twitter and EWOM Branding
 
Expressionism (final version)
Expressionism (final version)Expressionism (final version)
Expressionism (final version)
 
Supplemental Info: Say on Pay and Dodd Frank 20100723
Supplemental Info: Say on Pay and Dodd Frank 20100723Supplemental Info: Say on Pay and Dodd Frank 20100723
Supplemental Info: Say on Pay and Dodd Frank 20100723
 
Gracias Por Los Amigos1
Gracias Por Los Amigos1Gracias Por Los Amigos1
Gracias Por Los Amigos1
 
Anais
AnaisAnais
Anais
 

Similar a Performance By Design

Performance By Design
Performance By DesignPerformance By Design
Performance By DesignGuy Harrison
 
Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)Ravi Okade
 
No more Three Tier - A path to a better code for Cloud and Azure
No more Three Tier - A path to a better code for Cloud and AzureNo more Three Tier - A path to a better code for Cloud and Azure
No more Three Tier - A path to a better code for Cloud and AzureMarco Parenzan
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesJon Meredith
 
What Your Database Query is Really Doing
What Your Database Query is Really DoingWhat Your Database Query is Really Doing
What Your Database Query is Really DoingDave Stokes
 
Machine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossMachine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossAndrew Flatters
 
Using Cassandra with your Web Application
Using Cassandra with your Web ApplicationUsing Cassandra with your Web Application
Using Cassandra with your Web Applicationsupertom
 
http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151xlight
 
Inside SQL Server In-Memory OLTP
Inside SQL Server In-Memory OLTPInside SQL Server In-Memory OLTP
Inside SQL Server In-Memory OLTPBob Ward
 
Planning for Synchronization with Browser-Local Databases
Planning for Synchronization with Browser-Local DatabasesPlanning for Synchronization with Browser-Local Databases
Planning for Synchronization with Browser-Local DatabasesZendCon
 
Defense Against the Dark Arts: Protecting Your Data from ORMs
Defense Against the Dark Arts: Protecting Your Data from ORMsDefense Against the Dark Arts: Protecting Your Data from ORMs
Defense Against the Dark Arts: Protecting Your Data from ORMsVanessa Hurst
 
Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data LakeFishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data LakeArangoDB Database
 
136 latest dot net interview questions
136  latest dot net interview questions136  latest dot net interview questions
136 latest dot net interview questionssandi4204
 
Linq To The Enterprise
Linq To The EnterpriseLinq To The Enterprise
Linq To The EnterpriseDaniel Egan
 
MongoDB performance
MongoDB performanceMongoDB performance
MongoDB performanceMydbops
 
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Bill Wilder
 

Similar a Performance By Design (20)

Performance By Design
Performance By DesignPerformance By Design
Performance By Design
 
Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)
 
No more Three Tier - A path to a better code for Cloud and Azure
No more Three Tier - A path to a better code for Cloud and AzureNo more Three Tier - A path to a better code for Cloud and Azure
No more Three Tier - A path to a better code for Cloud and Azure
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
 
What Your Database Query is Really Doing
What Your Database Query is Really DoingWhat Your Database Query is Really Doing
What Your Database Query is Really Doing
 
Machine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossMachine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy Cross
 
Using Cassandra with your Web Application
Using Cassandra with your Web ApplicationUsing Cassandra with your Web Application
Using Cassandra with your Web Application
 
http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151
 
No sql
No sqlNo sql
No sql
 
Inside SQL Server In-Memory OLTP
Inside SQL Server In-Memory OLTPInside SQL Server In-Memory OLTP
Inside SQL Server In-Memory OLTP
 
Planning for Synchronization with Browser-Local Databases
Planning for Synchronization with Browser-Local DatabasesPlanning for Synchronization with Browser-Local Databases
Planning for Synchronization with Browser-Local Databases
 
Defense Against the Dark Arts: Protecting Your Data from ORMs
Defense Against the Dark Arts: Protecting Your Data from ORMsDefense Against the Dark Arts: Protecting Your Data from ORMs
Defense Against the Dark Arts: Protecting Your Data from ORMs
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data LakeFishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake
 
NoSQL
NoSQLNoSQL
NoSQL
 
Mr bi
Mr biMr bi
Mr bi
 
136 latest dot net interview questions
136  latest dot net interview questions136  latest dot net interview questions
136 latest dot net interview questions
 
Linq To The Enterprise
Linq To The EnterpriseLinq To The Enterprise
Linq To The Enterprise
 
MongoDB performance
MongoDB performanceMongoDB performance
MongoDB performance
 
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
 

Más de Guy Harrison

Five database trends - updated April 2015
Five database trends - updated April 2015Five database trends - updated April 2015
Five database trends - updated April 2015Guy Harrison
 
From oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsFrom oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsGuy Harrison
 
Thriving and surviving the Big Data revolution
Thriving and surviving the Big Data revolutionThriving and surviving the Big Data revolution
Thriving and surviving the Big Data revolutionGuy Harrison
 
Mega trends in information management
Mega trends in information managementMega trends in information management
Mega trends in information managementGuy Harrison
 
Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Guy Harrison
 
Making the most of ssd in oracle11g
Making the most of ssd in oracle11gMaking the most of ssd in oracle11g
Making the most of ssd in oracle11gGuy Harrison
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuningGuy Harrison
 
Hadoop and rdbms with sqoop
Hadoop and rdbms with sqoop Hadoop and rdbms with sqoop
Hadoop and rdbms with sqoop Guy Harrison
 
Next generation databases july2010
Next generation databases july2010Next generation databases july2010
Next generation databases july2010Guy Harrison
 
Optimize oracle on VMware (April 2011)
Optimize oracle on VMware (April 2011)Optimize oracle on VMware (April 2011)
Optimize oracle on VMware (April 2011)Guy Harrison
 
Optimizing Oracle databases with SSD - April 2014
Optimizing Oracle databases with SSD - April 2014Optimizing Oracle databases with SSD - April 2014
Optimizing Oracle databases with SSD - April 2014Guy Harrison
 
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...Guy Harrison
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance PlsqlGuy Harrison
 
Optimize Oracle On VMware (Sep 2011)
Optimize Oracle On VMware (Sep 2011)Optimize Oracle On VMware (Sep 2011)
Optimize Oracle On VMware (Sep 2011)Guy Harrison
 
Thanks for the Memory
Thanks for the MemoryThanks for the Memory
Thanks for the MemoryGuy Harrison
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
How I learned to stop worrying and love Oracle
How I learned to stop worrying and love OracleHow I learned to stop worrying and love Oracle
How I learned to stop worrying and love OracleGuy Harrison
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance PlsqlGuy Harrison
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Guy Harrison
 

Más de Guy Harrison (19)

Five database trends - updated April 2015
Five database trends - updated April 2015Five database trends - updated April 2015
Five database trends - updated April 2015
 
From oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsFrom oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other tools
 
Thriving and surviving the Big Data revolution
Thriving and surviving the Big Data revolutionThriving and surviving the Big Data revolution
Thriving and surviving the Big Data revolution
 
Mega trends in information management
Mega trends in information managementMega trends in information management
Mega trends in information management
 
Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data
 
Making the most of ssd in oracle11g
Making the most of ssd in oracle11gMaking the most of ssd in oracle11g
Making the most of ssd in oracle11g
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Hadoop and rdbms with sqoop
Hadoop and rdbms with sqoop Hadoop and rdbms with sqoop
Hadoop and rdbms with sqoop
 
Next generation databases july2010
Next generation databases july2010Next generation databases july2010
Next generation databases july2010
 
Optimize oracle on VMware (April 2011)
Optimize oracle on VMware (April 2011)Optimize oracle on VMware (April 2011)
Optimize oracle on VMware (April 2011)
 
Optimizing Oracle databases with SSD - April 2014
Optimizing Oracle databases with SSD - April 2014Optimizing Oracle databases with SSD - April 2014
Optimizing Oracle databases with SSD - April 2014
 
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance Plsql
 
Optimize Oracle On VMware (Sep 2011)
Optimize Oracle On VMware (Sep 2011)Optimize Oracle On VMware (Sep 2011)
Optimize Oracle On VMware (Sep 2011)
 
Thanks for the Memory
Thanks for the MemoryThanks for the Memory
Thanks for the Memory
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
How I learned to stop worrying and love Oracle
How I learned to stop worrying and love OracleHow I learned to stop worrying and love Oracle
How I learned to stop worrying and love Oracle
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance Plsql
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)
 

Último

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
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
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
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
 
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
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 
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
 
"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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 

Último (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
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
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
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
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
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
 
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
 
"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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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
 

Performance By Design

  • 1. Performance by Design Guy Harrison Director, R&D Melbourne www.guyharrison.net
  • 3.
  • 4. Save the red-shirt Toad! The Red-shirt Toad is NOT expendable!
  • 5. Core message Design limits performance Architecture maps requirements to design Make sure performance requirements are specified Make sure architecture allows for performance Make sure performance requirements are realized
  • 8. High performance can mean different things Speed: response time
  • 11. Not usually easy to change architectures
  • 15. “Twitter is, fundamentally, a messaging system. Twitter was not architected as a messaging system, however. For expediency's sake, Twitter was built with technologies and practices that are more appropriate to a content management system.”
  • 16. Patterns of database performance Hard to distinguish patterns at low levels
  • 17. Validating performance can’t wait... User adoption and growth UI Layer (HTML, JavaScript, Ajax) Middleware layer (J2EE) SQLs Database (Tables, views, partitions, etc)
  • 18.
  • 20. Normalize, but not too far!
  • 21. Other logical design thoughts Artificial keys Generally more efficient than long composite keys Null values Not a good idea if you intend to search for “unknown” or “incomplete” values Null should not mean something But beneficial as long as you don’t need to look for them. Data types Constraints on precision can sometimes reduce row lengths Variable length strings usually better Carefully consider CLOBs vs long VARCHARs
  • 22. Logical to Physical: Subtypes “Customers are people too”
  • 23. Indexing, clustering and weird table types Lots’ of options: B*-Tree index Bitmap index Hash cluster Index Cluster Nested table Index Organized Table Most often useful: B*-Tree (concatenated) indexes Bitmap indexes Hash Clusters
  • 24.
  • 25. Concatenated index effectiveness SELECT cust_id FROM sh.customers c WHERE cust_first_name = 'Connor' AND cust_last_name = 'Bishop' AND cust_year_of_birth = 1976;
  • 26. Concatenated indexing guidleines Create a concatenated index for columns from a table that appear together in the WHERE clause. If columns sometimes appear on their own in a WHERE clause, place them at the start of the index. The more selective a column is, the more useful it will be at the leading end of the index (better single key lookups) But indexes compress better when the leading columns are less selective. (better scans) Index skip scans can make use of an index even if the leading columns are not specified, but it’s a poor second choice to a “normal” index range scan.
  • 29.
  • 30. Bitmap join performance SELECT SUM (amount_sold) FROM customers JOIN sales s USING (cust_id) WHERE cust_email='flint.jeffreys@company2.com';
  • 32. Hash Cluster Cluster key determines physical location on disk Single IO lookup by cluster key Misconfiguration leads to overflow or sparse tables
  • 33. Hash Cluster vs B-tree index
  • 35. Denormalization and partitioning Repeating groups – VARRAYS, nested tables Summary tables – Materialized Views, Result cache Horizontal partitioning – Oracle Partition Option In-line aggregations – Dimensions Derived columns – Virtual columns Vertical partitioning Replicated columns - triggers
  • 36. Summary tables Aggregate queries on big tables often the most expensive Pre-computing them makes a lot of sense Balance accuracy with overhead Aggregate Query MV on COMMIT Manual Summary Result set cache MV stale tolerated Accuracy Efficiency
  • 38. Physical storage options LOB Storage PCTFREE Compression Block size Partitioning
  • 39.
  • 41. The best SQL is no SQL Avoid asking for the same data twice.
  • 42. 11g client side cache CLIENT_RESULT_CACHE_SIZE: this is the amount of memory each client program will dedicate to the cache. Use RESULT_CACHE hint or (11GR2) table property Optionally set the CLIENT_RESULT_CACHE_LAG
  • 43. Parse overhead It’s easy enough in most programming languages to create a unique SQL for every query:
  • 44. Bind variables are preferred
  • 46. Identifying similar SQLs See force_matching.sql at www.guyharrison.net
  • 47. Transaction design Optimistic vs. Pessimistic
  • 48. Using ORA_ROWSCN Setting ROWDEPENDENCIES will reduce false fails
  • 49. Network – stored procedures
  • 52. Network overhead – Array processing
  • 57. Geek quiz stuff: High probability answers (keep standing if): Know what Alice and Wally have in common You know the next number in this series 3 . 1 4 Know what “M” is in E=MC2
  • 58. Know (or can work out) your age in hex Have an opinion about of ST vs SW If you know who Leonard McCoy is Think there is an important distinction between Nerd and Geek Can quote Monty Python …. Other than dead parrot? You’ve ever watched Jerry Springer
  • 59. There are more networked devices in your house than people, pets and cars Know the names of two of Thomas the tank engines friends Know the names of any of Angelina and Brad’s babies Low probability answers: (sit down if you): Have a twitter account # Azure is your new favourite color
  • 60. You’ve ever played Zork You have a favourite Dr Who companion Your favourite is Sarah Jane Know your age in binary (or can work it out in your head) You are proficient in some form of assembler
  • 61. # You are proficient in some for or English There is a rubicks cube in your house Have your own domain Have ever been to Azeroth Who is Know who said “Dude I am not your nemesis”
  • 62. Worn a star trek or star wars costume Played a game that uses a non-six sided dice Get email on my phone – before getting out of bed Calculator watch Binary time piece Was on the internet prior to the WWW
  • 63. # Met my current partner on line Know the next thing in this sequence: Hydrogen, Helium, Lithuim, Berilium, …. Know what a Gigaquads in a megaquad is
  • 64. Saw a sci-fi movie more than twice at the movies ========================================================= You cleaned up at home before going to work

Notas del editor

  1. TelsavsMasseratiLatency vs throughputVolume?Economics?
  2. MethodsRequirementsMeasurementPrototypeBenchmarkData modelOptimize physical model to queryDenormalizeIndexing, clustering, partitionApplicationMinimize database accessOptimize database access
  3. http://www.steveschmidtracing.com/our-team-5.html
  4. Generally not easy to change architectures.....
  5. Normal form is the best starting point for an efficient database design. However, don’t go overboard in eliminating redundancy. A normalized data model is one in which any data redundancy has been eliminatedand in which data and relationships are uniquely identifiable by primaryand foreign keys. Although the normalized data model is rarely the final destinationfrom a performance point of view, the normalized data model is almost alwaysthe best starting point. Indeed, failing to normalize your logical model isfrequently a recipe for a poorly performing physical model.Relational theory provides for various levels of normal form, some of whichare of academic interest only. Third normal form is the most commonly adoptednormalization level, and it has the following characteristics:❏ All data in an entity (table) is dependent on the primary key.❏ There should be no repeating groups of attributes (columns).❏ No data in an entity is dependent on only part of the key.❏ No data in an entity is dependent on any nonkey attribute.These characteristics are often remembered through the adage “the key, thewhole key, and nothing but the key.”
  6. Subtypes categorize or partition a logical entity and help to classify thetypes of information that is within the entity. A subtype usually has a set of attributesthat are held in common with the parent entity (the super-type) andother attributes that are not shared with the super-type or other subtypes. Figure4-1 shows how a PEOPLE entity could be split into subtypes of CUSTOMERSand EMPLOYEES.When translating entity subtypes into tables, we have the following options:❏ Create tables for the super-type and for each subtype. The super-type tablecontains only columns that are common to both subtypes.❏ Create a table for the super-type only. Attributes from all subtypes becomecolumns in this super-table. Typically, columns from subtype attributes willbe nullable, and a category column indicates the subtype in which a row belongs.❏ Create separate tables for each subtype without creating a table for thesuper-type. Attributes from the super-type are duplicated in each table.The three solutions result in very different performance outcomes. In particular,creating tables for the super-type and each subtype is likely to reduce performancein most circumstances, except where only the super-type is subject to afull table scan. Table 4-1 compares the performance of each of the three solutionsfor common database operations.
  7. Remember, you don’t always have control over the network – in particular client side code may sometimes be located anywhere
  8. The further the code is (in network terms) from the database, the more the network effects will magnify. You can’t get any closer to the database than being inde the database as PL/SQL