Www.regouniversity.com Clarity Educational Community www.regouniversity.com Clarity Educational Community Creating and Tuning SQL Queries that Engage Users.

Slides:



Advertisements
Similar presentations
Copyright © 200\8 Quest Software High Performance PL/SQL Guy Harrison Chief Architect, Database Solutions.
Advertisements

Clarity Educational Community Portlet Creation and Management Getting Started with NSQL Presented by: Juan Ortega, David Zywiec.
Getting Started with Data Model
Clarity Educational Community Demand Management Overview Presented by: Clayton Reynolds and Brian Lofton | Date Prepared: April.
Clarity Educational Community Clarity Educational Community Integration Interface Strategies and Methods.
Clarity Educational Community Advanced Maximizing Portlet Function to Personalize Output Presented by: Sangeet Chourey and Chris.
Clarity Educational Community Resource Management Overview Presenters: Jerry Dolak and Karl Lockwood.
LCT2506 Internet 2 Further SQL Stored Procedures.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Chapter 7 Advanced SQL Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
A Guide to SQL, Seventh Edition. Objectives Embed SQL commands in PL/SQL programs Retrieve single rows using embedded SQL Update a table using embedded.
Clarity Educational Community Financial Management Overview Presented by: David Wachsmann & Jen Scarlato Prepared: 4/10/2015.
Clarity Educational Community Clarity Educational Community Tools and Techniques for Financial Processing.
Clarity Educational Community Clarity Educational Community Uncovering Dashboards Experts Unplugged Presented.
Clarity Educational Community Metrics that Matter Derek Phair & Eric Van Blarcum | May 4-6, 2015.
Clarity Educational Community Jaspersoft Navigation as an Ad Hoc User Presented by: Doug Greer | Prepared On: April 18, 2015.
Clarity Educational Community Portfolio Management Overview.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
ORACLE ONLINE TRAINING Contact our Support Team : SOFTNSOL India: Skype id : softnsoltrainings id:
Integrated PPM Governance Leveraging Org Change Management for PPM Process Implementations Presented by: Allan Mills.
Clarity Educational Community Get the Results You Need When You Need Them Transitioning to CA PPM On Demand Presented by: Joshua.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 11 Introduction to Dynamic SQL and Object Technology.
Clarity Educational Community Enhanced Functionality and Integration Advanced GEL Scripts Presented by: James Gille | Date Prepared:
Clarity Educational Community How Companies Are Using CA PPM for Application Portfolio Management Presented by: Mark Feher | Date.
Clarity Educational Community Using CA PPM for Effective Program Management Presented by: Brian Wuenstel and Don Dickson | Date.
Chapter 7 Advanced SQL Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Clarity Educational Community Configuration Releases Best Practices in the CA PPM Development Process Presented by: Brian Wuenstel.
Oracle PL/SQL Practices. Critical elements of PL/SQL Best Practices Build your development toolbox Unit test PL/SQL programs Optimize SQL in PL/SQL programs.
Microsoft Access Designing and creating tables and populating data.
Improving Database Performance Derrick Rapley
Auto-generation of Repeated Elements Part 2 of a series of XForms auto generation Date: 1/25/2008 Dan McCreary President Dan McCreary & Associates
SQL Performance and Optimization l SQL Overview l Performance Tuning Process l SQL-Tuning –EXPLAIN PLANs –Tuning Tools –Optimizing Table Scans –Optimizing.
By Shanna Epstein IS 257 September 16, Cnet.com Provides information, tools, and advice to help customers decide what to buy and how to get the.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Programming in R SQL in R. Running SQL in R In this session I will show you how to: Run basic SQL commands within R.
CF Performance Tuning Matt Liotta President & CEO Montara Software, Inc.
Dynamic SQL. 2 home back first prev next last What Will I Learn? Recall the stages through which all SQL statements pass Describe the reasons for using.
MapReduce Joins Shalish.V.J. A Refresher on Joins A join is an operation that combines records from two or more data sets based on a field or set of fields,
Oracle9i Developer: PL/SQL Programming Chapter 11 Performance Tuning.
Creating and Tuning SQL Queries that Engage Users Writing Efficient SQL.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
Dynamic SQL Writing Efficient Queries on the Fly ED POLLACK AUTOTASK CORPORATION DATABASE OPTIMIZATION ENGINEER.
IFS180 Intro. to Data Management Chapter 10 - Unions.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
A Guide to SQL, Seventh Edition
Query Optimization Techniques
392-"JOIN" us on DataServers Journey
Dynamic SQL Writing Efficient Queries on the Fly
Dynamic SQL: Writing Efficient Queries on the Fly
Database Performance Tuning &
Dynamic SQL Writing Efficient Queries on the Fly
Database Performance Tuning and Query Optimization
Agenda Database Development – Best Practices Why Performance Matters ?
The Killing Cursors Cyndi Johnson
Query Optimization Techniques
Dynamic SQL: Writing Efficient Queries on the Fly
The PROCESS of Queries John Deardurff
The PROCESS of Queries John Deardurff Website: ThatAwesomeTrainer.com
Cyndi Johnson Senior Software Engineer at AdvancedMD Killing Cursors.
The PROCESS of Queries John Deardurff
Contents Preface I Introduction Lesson Objectives I-2
Chapter 8 Advanced SQL.
Chapter 11 Database Performance Tuning and Query Optimization
Evaluation of Relational Operations: Other Techniques
Cyndi Johnson Senior Software Engineer at AdvancedMD Killing Cursors.
Query Optimization Techniques
Presentation transcript:

Clarity Educational Community Clarity Educational Community Creating and Tuning SQL Queries that Engage Users Presented by: Dave Matzdorf | Date Prepared: April 1, 2015

2 Clarity Educational Community 2 Agenda Goals Reusing Code Know Your Data Know Your Database Bottlenecks Tips and Tricks Exercises

3 Clarity Educational Community 3 Goal Improve the execution time of SQL queries Minimize system resources required to execute queries Utilize lesser known built in functions to avoid complexity Give the SQL optimizer the best chance of selecting a good execution plan

4 Clarity Educational Community 4 Reusing code Copying code – Over-reliance can lead to bloated and inefficient code – Review every time code is used – Understand the code Database views – One size does not fit all – Stacked views

5 Clarity Educational Community 5 Know your data What areas of the application are being used and in what volumes Be a partner in the requirements, not just a developer Understand the data model – Entity Relationship Diagram – Data dictionary tables – SQL Traces

6 Clarity Educational Community 6 Know Your Database SQL vs Procedural SQL (PL/SQL, T-SQL) – Do not use PL/SQL when SQL can be used – Row by row vs. set based processing – Context switching Hard parsing vs. soft parsing – Query caching – Hard parsing – Soft parsing Dynamic SQL – Limited query caching benefits – Can often be written as static SQL

7 Clarity Educational Community 7 Know Your Database – Bind Variables Bind variables – Finding queries in the cache without exact text match SELECT ID FROM SRM_RESOURCES WHERE UNIQUE_NAME = ‘dmatzdorf’ SELECT ID FROM SRM_RESOURCES WHERE UNIQUE_NAME = ? – Escape characters – Data type handling – Crucial when executing SQL within a programming loop

8 Clarity Educational Community 8 Common Bottlenecks IN vs. Exists – IN is typically better when the inner query contains a small result set – EXISTS is typically better when the inner query contains a large result set EXISTS vs. DISTINCT – DISTINCT produces the entire result set (including duplicates), sorts, and then filters out duplicates – EXISTS proceeds with fetching rows immediately after the sub-query condition has been satisfied the first time Double dipping – UNION queries – Repeated Inline Views

9 Clarity Educational Community 9 Subquery Factoring – WITH Clause Simplify complex queries Reduce repeated table access by generating temporary datasets during query execution Can be used as an inline view or a table

10 Clarity Educational Community 10 Clarity Educational Community Analytic Functions – Deriving Totals Replaces complex logic to summarize data Can be partitioned to derive summaries at different levels Provide simple solutions to things like running totals

11 Clarity Educational Community 11 Clarity Educational Community Analytic Functions – Selecting Records Replaces complex logic select certain records Select most recent status report Fetch prior or next records

12 Clarity Educational Community 12 Clarity Educational Community Working Examples Pull a list of users that belong to at least one security group Get the first resource assigned to each project team What percentage of total project allocation belongs to each team member

13 Clarity Educational Community 13 Clarity Educational Community Questions Phone Website We hope that you found this session informative and worthwhile. Our primary goal was to increase your understanding of the topic and CA PPM in general. There were many concepts covered during the session, if you would like to contact any presenter with questions, please reach out to us. Thank you for attending regoUniversity 2015!