Data Organization and Processing I

Similar documents
RNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague

1-2 Copyright Ó Oracle Corporation, All rights reserved.

Course Contents of ORACLE 9i

Oracle Architectural Components

Implementation of Database Systems David Konopnicki Taub 715 Spring Sources

Basics of SQL Transactions

The Oracle DBMS Architecture: A Technical Introduction

Oracle Tuning. Ashok Kapur Hawkeye Technology, Inc.

"Charting the Course... Oracle Database 12c: Architecture & Internals. Course Summary

Oracle Database 12c Performance Management and Tuning

Oracle Database 12c R2: New Features for Administrators Part 2 Ed 1

Things to remember when working with Oracle... (for UDB specialists)

Oracle Database 12c R2: New Features for Administrators Part 2 Ed 1 -

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

Configuring the Oracle Network Environment. Copyright 2009, Oracle. All rights reserved.

Using Oracle STATSPACK to assist with Application Performance Tuning

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

ORACLE 8 OBJECT ORIENTED TECHNOLOGY ORACLE SOFTWARE STRUCTURES SERVER SIDE BACKGROUND PROCESSES DATABASE SERVER AND DATABASE INSTANCE

DumpsKing. Latest exam dumps & reliable dumps VCE & valid certification king

Oracle Database 12c Administration I

ORACLE 11gR2 DBA. by Mr. Akal Singh ( Oracle Certified Master ) COURSE CONTENT. INTRODUCTION to ORACLE

Understanding and Leveraging the Oracle9i Advisories. Azeem Mohamed Product Marketing Manager Quest Software

Oracle Exam 1z0-062 Oracle Database 12c: Installation and Administration Version: 6.0 [ Total Questions: 166 ]

IT-Tage Dezember 2016 Frankfurt am Main Maritim Hotel

Ensuring Optimal Performance. Vivek Sharma. 3 rd November 2012 Sangam 2012

IT115: Oracle Database 12c Administration I

RAC for Beginners. Arup Nanda Longtime Oracle DBA (and a beginner, always)

Oracle Database 11g: SQL Tuning Workshop

Exam: 1Z Title : Oracle9i: Performance Tuning. Ver :

1z Oracle9i Performance Tuning. Version 19.0

Oracle 1Z Oracle Database 10g: Administration II. Download Full Version :

Oracle. Exam Questions 1Z Oracle Database 11g: Administration I. Version:Demo

RECO CKPT SMON ARCH PMON RMAN DBWR

Oracle Technical Questions. 1. What are the components of Physical database structure of Oracle Database?.

Kathleen Durant PhD Northeastern University CS Indexes

Oracle Database 10g: New Features for Administrators Release 2

Anthony AWR report INTERPRETATION PART I

RNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague

Module 1 Oracle Architecture

Question No : 1 Which three statements are true regarding persistent lightweight jobs? (Choose three.)

Why is my Oracle10g Database SLOWER than my Oracle9i Database? Dan Hotka Author/Speaker/Oracle Expert

ENHANCING DATABASE PERFORMANCE

Oracle Database 11g: Administration I

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

Carlos Fernando Gamboa, BNL Andrew Wong, TRIUMF. WLCG Collaboration Workshop, CERN Geneva, April 2008.

Oracle. 1z Oracle Database 11g- New Features for Administrators.

Datenbanksysteme II: Caching and File Structures. Ulf Leser

Managing Performance Through Versioning of Statistics

Oracle FLEXCUBE Private Banking May 2011

Oracle Database 12c. The Best Oracle Database 12c Tuning Features for Developers and DBAs. Presented by: Alex Zaballa, Oracle DBA

Oracle Performance Tuning. Overview of performance tuning strategies

Oracle Database 12c R2: Administration Workshop Ed 3 NEW

Oracle database overview. OpenLab Student lecture 13 July 2006 Eric Grancher

ORACLE DBA I. Exploring Oracle Database Architecture

Full Throttle: SQL Tuning & Ressource Consumption Appr.

Oracle Database 12c R2: Administration Workshop Ed 3

Analyzing a Statspack Report

Tuesday, April 6, Inside SQL Server

ITExamDownload. Provide the latest exam dumps for you. Download the free reference for study

Oracle Database 11g: SQL Tuning Workshop. Student Guide

COPYRIGHTED MATERIAL. Using SQL. The Processing Cycle for SQL Statements

IT100: Oracle Administration

Architettura Database Oracle

Database Management Systems Introduction to DBMS

Oracle 1Z Oracle Database 11g: Administration I. Download Full Version :

PERFORMANCE TUNING TRAINING IN BANGALORE


InnoDB: What s new in 8.0

Oracle Database 11g for Experienced 9i Database Administrators

Course: Oracle Database 12c R2: Administration Workshop Ed 3

How Oracle Does It. No Read Locks

Oracle Database 10g : Administration Workshop II (Release 2) Course 36 Contact Hours

Resolving Oracle Latch Contention

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

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

Oracle Database 11g: SQL Fundamentals I

Configuring Database Systems

MySQL Architecture and Components Guide

File Structures and Indexing

IT Best Practices Audit TCS offers a wide range of IT Best Practices Audit content covering 15 subjects and over 2200 topics, including:

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

Oracle 1Z Oracle Database 10g: Administration I. Download Full Version :

RAID in Practice, Overview of Indexing

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

ORACLE DBA TRAINING IN BANGALORE

Explore the Oracle 10g database architecture. Install software with the Oracle Universal Installer (OUI)

Oracle - Oracle Database 12c R2: Administration Workshop Ed 3

Independent consultant. Oracle ACE Director. Member of OakTable Network. Available for consulting In-house workshops. Performance Troubleshooting

Memory Management and Memory Structures

Oracle Database 11g: Performance Tuning DBA Release 2

SQL Server 2014 In-Memory Tables (Extreme Transaction Processing)

Chapter 13: I/O Systems

Oracle 11g AMM Inderpal S. Johal. Inderpal S. Johal, Data Softech Inc.

Seminar: Presenter: Oracle Database Objects Internals. Oren Nakdimon.

Oracle Database 11g : Performance Tuning DBA Release2

Managing an Oracle Instance

Interpreting Explain Plan Output. John Mullins

Independent consultant. Oracle ACE Director. Member of OakTable Network. Available for consulting In-house workshops. Performance Troubleshooting

Oracle 1Z Oracle 9i: New Features for Administrators. Download Full Version :

<Insert Picture Here> Exadata MAA Best Practices Series Session #4: Exadata and OLTP Applications

Transcription:

Data Organization and Processing I Data Organization in Oracle Server 11g R2 (NDBI007) RNDr. Michal Kopecký, Ph.D. http://www.ms.mff.cuni.cz/~kopecky

Database structure o Database structure o Database files o Memory structure o Process structure Outline Data access o SQL execution o SQL optimization o Indexes

Physical Database Structure 1. Data stored in files and/or disc partitions 2. Data accessed by the database instance set of processes communicating via the shared memory.

Data File Structure 1. Each file consists of 1. Header 2. Used space 3. Free space

Logical Data Structure 1. Data (tables and indexes) stored each in its own segment a linked list of extents. 2. Extent logically continuous set of database blocks 3. Database block the I/O unit. Fixed size for whole tablespace (usually for whole database).

Tablespaces

Tablespaces 1. Data stored in so called tablespaces logical database volumes. 2. Inidividually managed 1. Quotas 2. Offline/Online 3. Back up/restore 4. Recover

Tablespaces 1. Dictionary managed obsolete information about free and used space in data dictionary 2. Locally managed bitmap of free/used space in the tablespace itself 1. Automatic space management

Segments

Data Blocks 1. One DB Block (4KiB, 8KiB, ) consists of a sequence of OS blocks

Data Blocks

Data Rows 1. Each column stored as tuple (length,data) 2. Trailing NULLs not stored

Block Free Space Management 1. PCTFREE=x If free space drops under x%, block is removed from blocks available for INSERTs 2. PCTUSED=y If free space drops below y%, block becomes available for INSERTs

Block Free Space Coalescing

System Global Area 1. SGA stores all data, that can be shared by all running sessions 1. Database buffer cache 2. Redo log buffer 3. Shared pool 4. Large pool 5. 2. Program Global Area (PGA) stores data belonging to given process

Database Buffer 1. Default pool stores copies of DB blocks in external memory (disc) 2. Keep pool stores (all) blocks of small frequently used tables 3. Recycle pool stores blocks of large infrequently used tables to avoid consuming lot of space in default pool 4. Blocks of nondefault sizes have their own pool

Redo-log Buffer 1. Circular buffer that stores redo-log entries. When necessary (COMMIT, checkpoint, buffer full, ) are written to online redo-log file

Process Architecture 1. Client processes 1. Runs client code 2. Server processes 1. Runs Oracle code 3. Background Processes 1. Manipulates with data (bottom of the figure) 2. Check the database (right side of the figure)

Process Architecture 1. Individual Server processes access shared data in the SGA and private data in PGA

Dedicated Server Processes 1. Each client process has its own server process 1. Optimal for batch processing with intensive process usage (without or with less idle time)

Shared Server Processes 1. More clients share one server process through dispatcher process 1. Optimal for less intensive clients with much idle time

Redo Log Writer 1. Log Writer Process (LGWR) writes data from the buffer to online redo log file. 2. When file is full, the redo log switch occurs, checkpoint forced 1. All dirty data blocks written to the database files

Process Structure

Index Colaescing

Index Colaescing

Row Chaining 1. Row too long for the block stored partially in the block and partially in another block(s). Linked via pointers.

Row Migration 1. Row updated so it doesn t fit to the block is migrated to another block. Remains only pointer to keep original ROWID. 2. Two block reads instead of one.

Clustered Tables

SELECT Query Lifecycle 1. SQL statement parsing 1. Syntax checking 2. Semantic checking 2. Check existence of query plan in Shared Pool 3. If plan doesn t exist, generate as much of available plans as possible and choose the best (with lowest cost) 4. If plan doesn t exist, plan row source execution 5. Execute the query

Query Optimization 1. Query can be reformulated (IN operator can be replaced by OR and vice versa, ) 2. For each plan is estimated number of processed rows in nodes, number of bytes, number of read blocks, CPU usage, etc. 3. The cost of the plan is computed as the weighted sum according to internal statistics

Plan Cache Each execution plan is stored. According to the CURSOR_SHARING settins can be used repeatedly o o EXACT cursor sharing The plan can be used for the exactly same SQL statement SIMILAR cursor sharing The plan can be used for similar SQL statement with the same structure, but different constant Each constant is replaced by placeholder SELECT * FROM Emp WHERE ID=1 SELECT * FROM Emp WHERE ID=:x1 Values are bound to placeholders in time of execution PROS: less number of statement parsing CONS: optimization without knowledge of exact value may be ineffective in case of non-uniform distribution of values

B-Tree Indexes o For columns with high selectivity Bitmap o For columns with low selectivity o Can be combined using AND, OR to achieve higher selectivity Index organized Tables