Architettura Database Oracle

Similar documents
Oracle Database 11g: SQL Tuning Workshop

Oracle Database 11g: SQL Tuning Workshop. Student Guide

Oracle Performance Tuning. Overview of performance tuning strategies

Oracle 9i Application Development and Tuning

Oracle SQL Tuning for Developers Workshop Student Guide - Volume I

EZY Intellect Pte. Ltd., #1 Changi North Street 1, Singapore

SQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability

Oracle Database 12c: Performance Management and Tuning

Course Contents of ORACLE 9i

Session id: The Self-Managing Database: Guided Application and SQL Tuning

Oracle 1Z0-054 Exam Questions and Answers (PDF) Oracle 1Z0-054 Exam Questions 1Z0-054 BrainDumps

Oracle Database 11g: Performance Tuning DBA Release 2

Interpreting Explain Plan Output. John Mullins

Oracle EXAM - 1Z Oracle Database 11g: Performance Tuning. Buy Full Product.

Oracle Database 10g The Self-Managing Database

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

Oracle Database 12c Performance Management and Tuning

PERFORMANCE TUNING TRAINING IN BANGALORE

Oracle Database 11g: Performance Tuning DBA Release 2

Oracle Database 12c: SQL Tuning for Developers

Oracle Database: Introduction to SQL Ed 2

Oralogic Education Systems

<Insert Picture Here> DBA Best Practices: A Primer on Managing Oracle Databases

Using Oracle STATSPACK to assist with Application Performance Tuning

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems

Oracle Database: SQL and PL/SQL Fundamentals

5. Single-row function

Oracle Database: Program with PL/SQL Ed 2

ORACLE DATABASE 12C INTRODUCTION

Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days

Conditionally control code flow (loops, control structures). Create stored procedures and functions.

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time

Oracle Database 11g: SQL and PL/SQL Fundamentals

Advanced Oracle SQL Tuning v3.0 by Tanel Poder

Introduction. Assessment Test. Chapter 1 Introduction to Performance Tuning 1. Chapter 2 Sources of Tuning Information 33

Introduction to Computer Science and Business

Oracle Tuning. Ashok Kapur Hawkeye Technology, Inc.

Tuning SQL without the Tuning Pack. John Larkin JP Morgan Chase

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus

Oracle Database 11g : Performance Tuning DBA Release2

Projects. Corporate Trainer s Profile. CMM (Capability Maturity Model) level Project Standard:- TECHNOLOGIES

20 Essential Oracle SQL and PL/SQL Tuning Tips. John Mullins

1z0-064.exam.57q. Number: 1z0-064 Passing Score: 800 Time Limit: 120 min File Version: 1. Oracle 1z0-064

Oracle Database Performance Tuning, Benchmarks & Replication

Oracle PLSQL Training Syllabus

Oracle Database: Program with PL/SQL

Cost Based Optimizer CBO: Configuration Roadmap

Oracle Database: SQL and PL/SQL Fundamentals NEW

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Introduction to SQL/PLSQL Accelerated Ed 2

Oracle Syllabus Course code-r10605 SQL

Oracle Database: Introduction to SQL/PLSQL Accelerated

Learning Objectives : This chapter provides an introduction to performance tuning scenarios and its tools.

Foreword Preface Db2 Family And Db2 For Z/Os Environment Product Overview DB2 and the On-Demand Business DB2 Universal Database DB2 Middleware and

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led

Oracle - Oracle Database: Program with PL/SQL Ed 2

Top 7 Plan Stability Pitfalls & How to Avoid Them. Neil Chandler Chandler Systems Ltd UK

SQL+PL/SQL. Introduction to SQL

OpenWorld 2018 SQL Tuning Tips for Cloud Administrators

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Data Organization and Processing I

Data Warehouse Tuning. Without SQL Modification

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

<Insert Picture Here> DBA s New Best Friend: Advanced SQL Tuning Features of Oracle Database 11g

Oracle. Exam Questions 1Z Oracle Database 11g Release 2: SQL Tuning Exam. Version:Demo

In the Oracle Database 12c: Performance Management and

Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL]

Querying Data with Transact SQL

Oracle 12C DBA Online Training. Course Modules of Oracle 12C DBA Online Training: 1 Oracle Database 12c: Introduction to SQL:

Beyond Relational Databases: MongoDB, Redis & ClickHouse. Marcos Albe - Principal Support Percona

Oracle Database 11g & PL/SQL

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]

Oracle 1Z Oracle Database 11g Release 2- SQL Tuning. Download Full Version :

11gR2 Performance. Tuning Cookbook. Oracle Database. 1 enterprise J. performance from Oracle Database applications. achieve better

MySQL for Developers Ed 3

MTA Database Administrator Fundamentals Course

Querying Microsoft SQL Server (461)

7. Query Processing and Optimization

Oracle Architectural Components

Oracle Database: Introduction to SQL

IZ0-144Oracle 11g PL/SQL Certification (OCA) training

Oracle Database 10g: Introduction to SQL

Ryan Stephens. Ron Plew Arie D. Jones. Sams Teach Yourself FIFTH EDITION. 800 East 96th Street, Indianapolis, Indiana, 46240

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Lecture 08. Spring 2018 Borough of Manhattan Community College

Microsoft. [MS20762]: Developing SQL Databases

Oracle Exam 1z0-054 Oracle Database 11g: Performance Tuning Version: 5.0 [ Total Questions: 192 ]

Oracle Notes Part-5. Two Types of Cursor : 1)Implicit Cursor

Oracle Database 11g: Program with PL/SQL Release 2

Table of Contents. Oracle SQL PL/SQL Training Courses

Course Description. Audience. Prerequisites. At Course Completion. : Course 40074A : Microsoft SQL Server 2014 for Oracle DBAs

Developing SQL Databases

Analyzing a Statspack Report

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 8 Advanced SQL

20761 Querying Data with Transact SQL

Oracle Database 11g: Administer a Data Warehouse

Oracle Database 11g: Program with PL/SQL

Transcription:

Architettura Database Oracle

Shared Pool La shared pool consiste di: Data dictionary: cache che contiene informazioni relative agli oggetti del databse, lo storage ed i privilegi Library cache: contiene informazioni relative alle istruzioni Sql eseguite, i blocchi di codice PLSQL compilati o interpretati e le classi Java La corretta configurazione della shared pool influenza le performance in quanto: Riduce le letture a disco Consente di condividere il codice Sql Riduce l interpretazione delle istruzioni riducendo il consumo della CPU Riduce il sovraccarico dell utilizzo del latch

Program Global Area (PGA) PGA è l area di memoria che contiene: Session information Cursor information SQL execution work areas Sort area Hash join area Bitmap merge area Bitmap create area Influenza SQL performance. Può essere gestita manualmente o in modo automatico.

SQL Statement Processing Phases: Parse Searches for the statement in the shared pool Checks syntax Checks semantics and privileges Merges view definitions and subqueries Determines execution plan Minimize parsing as much as possible: Parse calls are expensive. Avoid reparsing Parse once, execute many times

SQL Statement Processing Phases: Bind Checks the statement for bind variables Assigns or reassigns a value to the bind variable Bind variables impact performance when: They are not used, and your statement would benefit from a shared cursor They are used, and your statement would benefit from a different execution plan

SQL Statement Processing Phases: Execute and Fetch Execute phase: Executes the SQL statement Performs necessary I/O and sorts for data manipulation language (DML) statements Fetch phase: Retrieves rows for a query Sorts for queries when needed Uses an array fetch mechanism

Functions of the Oracle Query Optimizer The Oracle query optimizer determines the most efficient execution plan and is the most important step in the processing of any SQL statement. The optimizer: Evaluates expressions and conditions Uses object and system statistics Decides how to access the data Decides how to join tables Decides which path is most efficient

Top Database Performance Issues Bad connection management Poor use of cursors and the shared pool Bad SQL Nonstandard initialization parameters I/O issues Long full-table scans In-disk sorts High amounts of recursive SQL Schema errors and optimizer problems

Metodologia di Tuning

Performance Problems Inadequate consumable resources CPU I/O Memory (may be detected as an I/O problem) Data communications resources High-load SQL Contention

Factors to Be Managed Schema Data design Indexes Application SQL statements Procedural code Instance Database User expectations Hardware and network tuning

Tuning Goals Reduce the response time Reduce resource usage

Overview of SQL Tuning 1. Identify causes of poor performance. 2. Identify problematic SQL. Automatic: ADDM, Top SQL Manual: V$ views, statspack 3. Implement changes to: SQL statement constructs Access structures such as indexes

Overview of SQL Tuning 1. Identify causes of poor performance. 2. Identify problematic SQL. Automatic: ADDM, Top SQL Manual: V$ views, statspack 3. Manual tuning 4. Implement changes to: SQL statement constructs Access structures such as indexes

Manual Tuning 1. Gather information about the referenced objects. 2. Gather optimizer statistics. 3. Review execution plans. 4. Restructure SQL statements. 5. Restructure indexes and create materialized views. 6. Maintain execution plans.

Gather Information About Referenced Objects SQL text Structure of tables and indexes Optimizer statistics Views Optimizer plan: current and prior

Gathering Optimizer Statistics Gather statistics for all tables. Gather new statistics when existing statistics become stale.

Reviewing the Execution Plan Driving table has the best filter. Fewest number of rows are being returned to the next step. The join method is appropriate for the number of rows being returned. Views are used efficiently. There are no unintentional Cartesian products. Each table is being accessed efficiently. Examine the predicates in the SQL statement and the number of rows in the table. A full table scan does not mean inefficiency.

Restructuring the SQL Statements Compose predicates by using AND and =. Avoid transformed columns in the WHERE clause. Avoid mixed-mode expressions and beware of implicit type conversions. Write separate SQL statements for specific tasks and use SQL constructs appropriately. Use EXISTS or IN for subqueries as required. Cautiously change the access path and join order with hints.

Restructuring the Indexes Remove unnecessary indexes to speed the DML. Index the performance-critical access paths. Reorder columns in existing concatenated indexes. Add columns to the index to improve selectivity. Create appropriate indexes based on usage type: B*tree Bitmap Bitmap join Consider index-organized tables.

Design and Developin for Performance

Understanding Scalability Scalability is a system s ability to process more workload, with a proportional increase in system resource use. Poor scalability leads to system resource exhaustion to the extent that additional throughput is impossible when the system s workload is increased.

Scalability with Application Design, Implementation, and Configuration Applications have a significant impact on scalability. Poor schema design can cause expensive SQL that does not scale. Poor transaction design can cause locking and serialization problems. Poor connection management can cause unsatisfactory response times and unreliable systems.

Configuring the Appropriate System Architecture for Your Requirements Interactive applications (OLTP) Process-driven applications (OLAP)

Proactive Tuning Methodology Simple design Data modeling Tables and indexes Using views Writing efficient SQL Cursor sharing Using bind variables Dynamic SQL

Simplicity In Application Design Simple tables Well-written SQL Indexing only as required Retrieving only required information

Index Design Index keys Primary key Unique key Foreign keys Index data that is frequently queried Use SQL as a guide to index design

Using Views Simplifies application design Is transparent to the end user Can cause suboptimal execution plans

Writing SQL to Share Cursors Create generic code using the following: Stored procedures and packages Database triggers Any other library routines and procedures Write to format standards: Case White space Comments Object references Bind variables

Importance of Sharing Cursors Reduces parsing Dynamically adjusts memory Improves memory usage The CURSOR_SHARING initialization parameter can be set to: EXACT (default) SIMILAR (not recommended) FORCE

Performance Checklist Set initialization parameters and storage options. Verify resource usage of SQL statements. Validate connections by middleware. Verify cursor sharing. Verify validity and availability of optimizer statistics.