ENHANCING DATABASE PERFORMANCE
|
|
- Carmella Glenn
- 6 years ago
- Views:
Transcription
1 ENHANCING DATABASE PERFORMANCE Performance Topics Monitoring Load Balancing Defragmenting Free Space Striping Tables Using Clusters Using Efficient Table Structures Using Indexing Optimizing Queries Supplying Hints to the Qptimizer. Monitoring Performance through Enterprise Manger. 1
2 Monitoring Load Balancing Monitoring Load Balancing and I/O Contention Examine the physical reads and writes on each physical devise. Move files to different physical devises to better balance the reads and writes. 2
3 Monitoring Load Balancing and I/O Contention (cont.) SQL> select d.name, f.phyrds, f.phywrts 2 from v$datafile d, v$filestat f 3 where d.file# = f.file#; NAME PHYRDS PHYWRTS /oraclec/data/db08/disk1/system01.dbf /oraclec/data/db08/disk1/tools01.dbf 5 3 /oraclec/data/db08/disk1/rbs01.dbf 8 50 /oraclec/data/db08/disk1/temp01.dbf 5 3 /oraclec/data/db08/disk1/users01.dbf 5 3 /oraclec/data/db08/disk1/indx01.dbf 5 3 /oraclec/data/dbins/disk1/data01.dbf /oraclec/data/dbins/disk1/indexes01.dbf 7 7 Moving a Data File 1. Take the tablespace offline using: ALTER TABLESPACE tablespace_name OFFLINE; 2. Shutdown the database 3. Use the unix mv command to move the file to the new location. 4. Use the following command to rename the file in Oracle. ALTER TABLESPACE RENAME DATAFILE full specification of old file including location TO full specification of new file including location 5. Bring the tablespace online using ALTER TABLESPACE tablespace_name ONLINE; 3
4 Monitoring Free Space Fragmentation Prior to Oracle version 9, the dictionary managed extents could be of different sizes. As data were deleted and added, fragments of unused free space would develop. To examine and minimize this free space: Query dba_free_space for the number of free space segments. Defragment the free space. Querying for Free Space Segments SQL> select tablespace_name, 2 sum(bytes), max(bytes), 3 count(tablespace_name) 4 as Fragments 5 from dba_free_space 6 group by tablespace_name; TABLESPACE_NAME SUM(BYTES) MAX(BYTES) FRAGMENTS AUDIT_ RBS SYSTEM TEMP TOOLS USERS
5 Coalescing Free Space Enter the following SQL statement for each tablespace that has significant fragmentation substituting a tablespace name for TBSNAME. :SQL> Alter Tablespace TBSNAME Coalesce; Contiguous segments of free space will be merged into one large segment of free space. Extents allocated to Segments will not be coalesced or moved. Striping If multiple I/O devices are available, you may increase performance when retrieving data from large tables by striping the table across multiple devises. An extent acquired by a table must fit entirely on a single disk. However, different extents of the same table may exist on different disks as shown below. Disk 1 Disk 2 Disk 3 Extent 1 Extent 2 Extent 3 5
6 Striping Example 1. Estimate the total size of the table. Suppose the table will have a size of 72K. 2. Decide how many striped segments you want to create. In this example, there will be three striped segments 3. Divide the size of the table by the number of striped segment. (72K / 3 = 24K in the example). This provides the size of each extent. 4. Create a tablespace placing the following conditions on the data files. Create a data file for each striped segment. Locate each data file on a separate disk. Size each data file one database block size larger than the extent that will be placed in it. (24K + 8K = 32K in the example). 5. Create the table assigning it to the tablespace you created above. Make the Initial and Next extents the size of the striped segment (24K in the example). Set the PctIncrease to zero. Set both the Minextents and Maxextents to the value of the number of striped segments (three in the example). Creating the Stripe Tablespace The statement below will create the Stripe tablespace with three data files. Each data file is located on a different disk. SQL> Create Tablespace Stripe 2 Datafile '/oraclec/data/db08/disk2/stripe02.dbf' 3 Size 32K, 4 '/oraclec/data/db08/disk3/stripe03.dbf' 5 Size 32K, 6 '/oraclec/data/db08/disk4/striped04.dbf' 7 Size 32K 8 Default Storage ( 9 Initial 32K Next 32K 10 Minextents 1 Maxextents PctIncrease 0); 6
7 Creating the TEST Table The TEST table below is created with three extents all of size 24K. Each extent must be located on a different disk since two 24K extents will not fit on one 32K disk. This technique works with Dictionary Managed Extents and must be slightly modified for Locally Managed Extents. SQL> Create Table TEST 2 (x1 char(10), x2 char(10)) 3 Tablespace STRIPE -- Place in Stripe 4 Storage (Initial 24K Next 24K 5 Minextents 3 Maxextents 3); USING CLUSTERS 7
8 Clusters Clusters are database objects that will cause data from the related tables to be stored in close proximity for more efficient data retrieval. Tables in the cluster must have a common column (up to 16 tables). Tables are normally selected using a join condition. Types of Clusters Index Clusters Have a single B-tree index storing the cluster key that is used to access all of the tables in the cluster. Hash Clusters stores pointers to specific rows within the tables. The pointers are created based upon a formula. Cluster Key based upon a common column contained by all of the tables in the cluster. All the columns must be of the same data type and length. 8
9 Advantages Of Clusters Reduce Disk I/O. Improve Access Time. Reduce Space Required for Indexes. Selects, Updates, and Deletes are Faster. Disadvantages Of Clusters More Rollback Data and Redo Log Data Generated. Inserts are Slower. Loading of Tables is Much Slower. Selecting From Individual Tables is Slower. 9
10 Attributes Of Good Cluster Table Candidates Table is Frequently Queried But Not Often Updated. Key Columns Contain Redundancy. Tables Usually Joined. Attributes Of Good Cluster Key Candidates Low Degree of Cardinality. Used to Join Multiple Tables. Cannot Be of LONG or LONG RAW Datatypes. 10
11 Use Hashing When: Tables Do Not Vary in Size. Optimizing Query Performance is the Only Objective. Key Columns are Numeric. Queries are Equality Queries on the Hashed Columns. The Hash Key is Well Distributed. Creating The Index Cluster SQL> connect jerry/welcome Connected. SQL> CREATE CLUSTER Emp_Cluster(Dept Varchar2(4)) 2 Size 75 3 TABLESPACE Data; SQL> CREATE INDEX Emp_Clu_Indx 2 ON CLUSTER Emp_Cluster 3 TABLESPACE INDEXES; Index created. 11
12 Adding Tables to the Index Cluster SQL> CREATE TABLE Dept_Table 2 (Dept Varchar2(4) Primary Key, 3 DName Varchar2(20)) 4 CLUSTER Emp_Cluster (Dept); Table created. SQL> CREATE TABLE Emp_Table 2 (ID Varchar2(4), 3 Name Varchar2(20), 4 Salary Number(6), 5 Dept Varchar2(4) References Dept_Table) 6 CLUSTER Emp_Cluster (Dept); Table created. Creating the Hash Cluster SQL> CREATE CLUSTER Emp_Hash_Cluster (Dept Number(4)) 2 Hashkeys TABLESPACE Data; Cluster created. SQL> CREATE TABLE Dept_HTable 2 (Dept Number(4) Primary Key, 3 DName Varchar2(20)) 4 CLUSTER Emp_Hash_Cluster (Dept); Table created. SQL> CREATE TABLE Emp_HTable 2 (ID Char(4) Primary Key, 3 Name Varchar2(20), 4 Dept Number(4) References Dept_HTable) 5 CLUSTER Emp_Hash_Cluster (Dept); Table created. 12
13 Viewing Clusters and Tables SQL> connect system/change_on_install Connected. SQL> Select Owner, Table_Name, 2 Cluster_Name, Cluster_Owner 3 From DBA_Tables 4 Where Owner = 'JERRY' 5 And Cluster_Name Is Not Null 6 Order By Cluster_Name; OWNER TABLE_NAME CLUSTER_NAME CLUSTER_OWNER JERRY DEPT_TABLE EMP_CLUSTER JERRY JERRY EMP_TABLE EMP_CLUSTER JERRY JERRY DEPT_HTABLE EMP_HASH_CLUSTER JERRY JERRY EMP_HTABLE EMP_HASH_CLUSTER JERRY Removing Clusters The following statement removes the cluster but the tables and constraints remain. SQL> DROP CLUSTER Emp_Cluster; The following statement removes the cluster and the tables. SQL> DROP CLUSTER Emp_Cluster 2 INCLUDING TABLES; The following statement removes the cluster and tables. It also removes all constraints that had been written on tables in the cluster. SQL> DROP CLUSTER Emp_Cluster 2 INCLUDING TABLES 3 CASCADE CONSTRAINTS; 13
14 EFFICIENT TABLES Partitioned Tables Partitioning tables allows you to store a single table in two or more separate partitions. This allows you to store a table on more than one tablespace and on more than one disk file. To create the partitioned table: Create the new tablespaces placing them on different disks, if possible. Create the table, partitioning the data based upon some criterion (name ranges, salary ranges, etc. 14
15 Partition by Range and List Partition By Range if you have continuous values such as a Salary. Partition By List if you have discrete values such as a list of Departments. Tablespaces for Partitioned Table SQL> Create Tablespace Emp_TS1 2 Datafile '/oraclec/data/db08/disk1/emp_ts101.dbf' 3 Size 10M 4 Uniform size 100K; Tablespace created. SQL> Create Tablespace Emp_TS1 2 Datafile '/oraclec/data/db08/disk2/emp_ts201.dbf' 3 Size 10M 4 Uniform size 100K; Tablespace Created. 15
16 Creating the Partitioned Table (Partition By Range) SQL> Create Table EMP 2 (ID Number(9) primary key, 3 Name Varchar2(20), 4 Salary Number(10,2), 5 Dept Varchar2(4)) 6 Partition by Range (Name) 7 (Partition EMP1 values less than ('N') 8 tablespace EMP_TS1, 9 Partition EMP2 values less than (maxvalue) 10 tablespace EMP_TS2); Table created. Creating the Partitioned Table (Partition By List) SQL> Create Table EMP 2 (ID Number(9) primary key, 3 Name Varchar2(20), 4 Salary Number(10,2), 5 Dept Varchar2(4)) 6 Partition by List (Dept) 7 (Partition EMP1 values ( MIS, ACC ) 8 tablespace EMP_TS1, 9 Partition EMP2 values ( MGT, FIN ) 10 tablespace EMP_TS2); Table created. 16
17 Indexed Organization Tables An Indexed Organization table (IOT) maintains the data sorted by the primary key of the table. Data may be entered in any order and the IOT will save the rows sorted according to the primary key values. An IOT should be used when: The table is a smaller lookup table. The table is frequently referenced as a foreign key in other tables. Creating the IOT SQL> CREATE TABLE Dept_IO (DeptNO Char(3) Primary Key, 2 DName Varchar2(30)) 3 ORGANIZATION INDEX; Table created. SQL> INSERT INTO Dept_IO VALUES 2 ('MIS', 'Management Info Systems'); 1 row created. SQL> INSERT INTO Dept_IO VALUES ('ACC', 'Accounting'); 1 row created. SQL> Select * From Dept_IO; DEP DNAME ACC Accounting MIS Management Info Systems Rows are ordered in the table even though the data were not entered in order. 17
18 INDEXING METHODS Index Row ID SQL> select id,name,salary,dept,rowid from emp; ID NAME SALARY DEPT ROWID Joe MIS AAAAwLAAHAAAAAKAAA 2 John ACC AAAAwLAAHAAAAAKAAB ROWID VALUE AAAAwL AAH AAAAAK AAA CODING Segment Identifier Data File Identifier. Data Block Identifier Row Identifier 18
19 Simple B-Tree Indexes Simple index on the Salary column. Unique index indicates no SSN values may be duplicated. Index on concatenated columns. SQL> Create Index emp_salary_index 2 on EMP(Salary) 3 tablespace Indexes; Index created. SQL> Create Unique Index emp_ssn_idx 2 on EMP(SSN) 3 tablespace Indexes; Index created. SQL> Create index emp_name_idx 2 on EMP(first last) 3 tablespace Indexes; Index created. Composite B-Tree Indexes Salary is indexed in descending order. Probably to sort data for a report. SQL> Create Index emp_salary_idx 2 on EMP(Salary DESC) 3 tablespace Indexes; Index created. Composite index indicates the presentation of Dept values in ascending order and Salary values in descending order. SQL> Create Index emp_report_idx 2 on EMP(Dept ASC, Salary DESC) 3 tablespace Indexes; Index created. 19
20 Reverse Indexes Use a Reverse Index if the column being indexed contains values that don t vary for the first several characters. For example, a company has employee id s that all be begin with the number 900). SQL> Create Index Emp_Dept_Idx 2 on EMP(Dept) Reverse 3 tablespace Indexes; Index created. Function Based Indexes The data are frequently queried as shown with the retrieval condition based upon a formula. SQL> Select Name, Salary * From EMP 3 Where Salary * 1.08 > 45000; An index on the Salary column will not be used against the query shown above. The index shown on the right is required. SQL> Create Index emp_raises_idx 2 on EMP(Salary * 1.08) 3 tablespace indexes; Index created. 20
21 Bitmap Indexes The data on the right reside in the EMP table. There will be a Bitmap Index created on the Dept column. ID NAME SALARY DEPT Joe MIS 2 John ACC 3 John MIS 4 John MGT 5 John ACC The Unique values of the Dept column become the rows of the Index. The columns of the Index are the rows of the table data. DEPT MIS ACC MGT SQL> Create Bitmap Index emp_dept_idx on EMP (Dept) 2 tablespace Indexes; Maintaining Indexes Whenever many inserts, updates, and deletes have occurred against an indexed table, the table s index should be rebuild periodically. The following query will rebuild the index and place it in the appropriate tablespace if the index has not been properly located. SQL> ALTER INDEX Emp_Dept_Idx 2 REBUILD 3 TABLESPACE Indexes; 21
22 Query Optimization Types of Query Optimization Rule Based the optimizer looks to an ordered set of rules and will use the method of highest priority to retrieve the data. Cost Based the optimizer evaluates the resource cost of extracting the data. A compute statistics or estimate statistics must have been run against all tables involved in the query to use this type of optimization. 22
23 Rule Based Optimization Rules indicate a set of precedence. The optimizer will use the access with the highest value, if found. Reading the results of Explain Plan is subjective. Order of Rules Order Type of Access. 1. Single Row by ROWID 2. Single row by cluster join 3. Single row by hash cluster key with unique or primary key. 4. Single row by unique or primary key. 5. Cluster join 6. Hash cluster key. 7. Indexed cluster key. 8. Composite index. 23
24 Order of Rules (cont.) Order Type of Access. 9. Single column index. 10. Bounded range search on indexed columns. 11. Unbounded range search on indexed columns. 12. Sort-merge join. 13. MAX() or MIN() of indexed column. 14. ORDER BY on indexed columns. 15. Full table scan. Using Explain Plan SQL> connect / as sysdba Connected. From SYS run the following script file. (Do this only once) Use the following statement to create an execution plan for a query. SQL> EXPLAIN PLAN 2 SET STATEMENT_ID = 'My_ID' FOR 3 SELECT...; The execution plan for your query will be in the SYS.PLAN_TABLE and identified with a Statement_ID = My_ID. 24
25 Cost Based Optimization Default optimization beginning with Oracle 8.0 Run Compute Statistics or Estimate Statistics on all tables used in the queries. Modify the initdb0x.ora to allow for cost based optimization. Use tkprof to read the resource cost statistics. Modifying The PFile. Edit the initdb0x.ora and add or change the following values. Save the file and shudown the database. Create the SPFile from the PFile and startup the database. MAX_DUMP_FILE_SIZE must be set to a value (in db blocks). TIMED_STATISTICS must be set to TRUE. USER_DUMP_DEST must contain a path/file name. If you want to generate Cost Statistics on all queries you enter, set the following value in the initdb0x.ora file. SQL_TRACE set to TRUE 25
26 Selective Cost Statistics If you want to generate cost statistics on only some queries, set SQL_TRACE = FALSE in the parameter file and turn SQL_TRACE on and off as shown below to generate the statistics. SQL> ALTER SESSION SET sql_trace = TRUE; Run the query (or queries) SQL> ALTER SESSION SET sql_trace = FALSE; Using tkprof Whenever you run a query with SQL_TRACE = TRUE, a trace file will be created with a name following the pattern ora_xxxx.trc. The tkprof utility program will convert the trace file to a file you can edit and read as show below. Note that tkprof is run from the O/S not SQL. [24]> tkprof ora_xxxx.trc ora_xxxx.log. 26
27 Supplying Hints to the Optimizer Using Hints Hints allow you to instruct the optimizer on how the query is to be executed. Hints may be used for INSERT, UPDATE, and DELETE statements and follow the structure below: SQL> Select /*+ hint */... The /* and */ represent the beginning and end of comments. The comment must be placed immediately after the SELECT, UPDATE or DELETE keyword. The + indicates a hint follows. The first character after the /* must be a +. Multiple hints may be placed in the comments. Syntax errors in a hint will cause the hint to be ignored. 27
28 Some Useful Hints Hint Description All_Rows First_Rows(n) Choose Rule INDEX (tname iname) NO_INDEX (tname iname) Ordered Retrieves all of the rows with the lowest possible resource cost. Retrieves the first n rows as quickly as possible. Requests Oracle to choose between Rule-Based or Cost-Based optimization. Requests Oracle to use Rule-Based optimization. Requests Oracle to use the iname index on the tname table. Requests that Oracle NOT use the iname index on the tname table. Requests Oracle to join the tables in the order in which they appear in the From clause Retrieve the first 6 rows from EMP as quickly as possible. Update all rows of EMP locating the rows using Rule- Based optimization Select all rows from EMP using the SAL_IDX index. Examples of Hints Select /*+ first_rows(6) */ * From EMP; UPDATE /*+ Rule */ EMP SET Salary = ; Select /*+ INDEX (EMP SAL_IDX) */ * From EMP; Join the Movie and Actor table in the order shown in the From statement. Select /*+ Ordered */ Mname,ActName From Movie a, Actor b,movact c Where a. MID = c.mid And b. AID = c.aic; 28
ROLLBACK SEGMENTS. In this chapter, you will learn about: Rollback Segment Management Page 272
C H A P T E R 1 2 ROLLBACK SEGMENTS CHAPTER OBJECTIVES In this chapter, you will learn about: Rollback Segment Management Page 272 The information in a rollback segment is used for query read consistency,
More informationCreating and Managing Tables Schedule: Timing Topic
9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the
More informationIT100: Oracle Administration
IT100: Oracle Administration IT100 Rev.001 CMCT COURSE OUTLINE Page 1 of 8 Training Description: Introduction to Oracle Administration and Management is a five-day course designed to provide Oracle professionals
More informationInputs. Decisions. Leads to
Chapter 6: Physical Database Design and Performance Modern Database Management 9 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Heikki Topi 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Objectives
More informationCSC Web Programming. Introduction to SQL
CSC 242 - Web Programming Introduction to SQL SQL Statements Data Definition Language CREATE ALTER DROP Data Manipulation Language INSERT UPDATE DELETE Data Query Language SELECT SQL statements end with
More informationTuning Considerations for Different Applications Lesson 4
4 Tuning Considerations for Different Applications Lesson 4 Objectives After completing this lesson, you should be able to do the following: Use the available data access methods to tune the logical design
More informationCourse Contents of ORACLE 9i
Overview of Oracle9i Server Architecture Course Contents of ORACLE 9i Responsibilities of a DBA Changing DBA Environments What is an Oracle Server? Oracle Versioning Server Architectural Overview Operating
More informationIndexes (continued) Customer table with record numbers. Source: Concepts of Database Management
12 Advanced Topics Objectives Use indexes to improve database performance Examine the security features of a DBMS Discuss entity, referential, and legal-values integrity Make changes to the structure of
More informationDatabases IIB: DBMS-Implementation Exercise Sheet 13
Prof. Dr. Stefan Brass January 27, 2017 Institut für Informatik MLU Halle-Wittenberg Databases IIB: DBMS-Implementation Exercise Sheet 13 As requested by the students, the repetition questions a) will
More informationIntroduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe
Introduction to Query Processing and Query Optimization Techniques Outline Translating SQL Queries into Relational Algebra Algorithms for External Sorting Algorithms for SELECT and JOIN Operations Algorithms
More informationITCertMaster. Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way!
ITCertMaster Safe, simple and fast. 100% Pass guarantee! http://www.itcertmaster.com Exam : 1z0-007 Title : Introduction to Oracle9i: SQL Vendor : Oracle Version : DEMO Get Latest & Valid 1Z0-007 Exam's
More informationD B M G Data Base and Data Mining Group of Politecnico di Torino
Database Management Data Base and Data Mining Group of tania.cerquitelli@polito.it A.A. 2014-2015 Optimizer operations Operation Evaluation of expressions and conditions Statement transformation Description
More informationUnit 1 - Chapter 4,5
Unit 1 - Chapter 4,5 CREATE DATABASE DatabaseName; SHOW DATABASES; USE DatabaseName; DROP DATABASE DatabaseName; CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype,... columnn
More informationFull file at
SQL for SQL Server 1 True/False Questions Chapter 2 Creating Tables and Indexes 1. In order to create a table, three pieces of information must be determined: (1) the table name, (2) the column names,
More informationChapter 2. DB2 concepts
4960ch02qxd 10/6/2000 7:20 AM Page 37 DB2 concepts Chapter 2 Structured query language 38 DB2 data structures 40 Enforcing business rules 49 DB2 system structures 52 Application processes and transactions
More informationTablespace Usage By Schema In Oracle 11g Query To Check Temp
Tablespace Usage By Schema In Oracle 11g Query To Check Temp The APPS schema has access to the complete Oracle E-Business Suite data model. E-Business Suite Release 12.2 requires an Oracle database block
More informationThese copies should be placed on different disks, if possible. Disk 1 Disk 2 Disk 3
DATABASE CONFIGURATIONS Configuration Topics Simple Databases with Mirroring Multiplexing Control Files and REDO Logs Disk Shadowing Database Links and Snapshots Optimal Flexible Architecture 1 Stand Alone
More informationDatabase Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL)
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 7 Introduction to Structured Query Language (SQL) Objectives In this chapter, students will learn: The basic commands and
More informationSQL. Char (30) can store ram, ramji007 or 80- b
SQL In Relational database Model all the information is stored on Tables, these tables are divided into rows and columns. A collection on related tables are called DATABASE. A named table in a database
More informationSeminar: Presenter: Oracle Database Objects Internals. Oren Nakdimon.
Seminar: Oracle Database Objects Internals Presenter: Oren Nakdimon www.db-oriented.com oren@db-oriented.com 054-4393763 @DBoriented 1 Oren Nakdimon Who Am I? Chronology by Oracle years When What Where
More informationProjects. Corporate Trainer s Profile. CMM (Capability Maturity Model) level Project Standard:- TECHNOLOGIES
Corporate Trainer s Profile Corporate Trainers are having the experience of 4 to 12 years in development, working with TOP CMM level 5 comapnies (Project Leader /Project Manager ) qualified from NIT/IIT/IIM
More informationCustomer PTC E-Newsletter Date: 4/9/03
Customer PTC E-Newsletter Date: 4/9/03 PTC Product Focus: A) Pro/ENGINEER ModelCHECK Structure Tips of the Week: Fragmentation B) Oracle for Windchill : Understanding the Basic Database A) Associative
More informationGIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement
GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces
More information192 Chapter 14. TotalCost=3 (1, , 000) = 6, 000
192 Chapter 14 5. SORT-MERGE: With 52 buffer pages we have B> M so we can use the mergeon-the-fly refinement which costs 3 (M + N). TotalCost=3 (1, 000 + 1, 000) = 6, 000 HASH JOIN: Now both relations
More informationData Organization and Processing I
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
More informationAlgorithms for Query Processing and Optimization. 0. Introduction to Query Processing (1)
Chapter 19 Algorithms for Query Processing and Optimization 0. Introduction to Query Processing (1) Query optimization: The process of choosing a suitable execution strategy for processing a query. Two
More informationExam: 1Z Title : Oracle9i: Performance Tuning. Ver :
Exam: Title : Oracle9i: Performance Tuning Ver : 01.22.04 Section A contains 226 questions. Section B contains 60 questions. The total number of questions is 286. Answers to the unanswered questions will
More informationChapter 17 Indexing Structures for Files and Physical Database Design
Chapter 17 Indexing Structures for Files and Physical Database Design We assume that a file already exists with some primary organization unordered, ordered or hash. The index provides alternate ways to
More informationSQL (Structured Query Language)
Dear Student, Based upon your enquiry we are pleased to send you the course curriculum for Oracle DBA 11g SQL (Structured Query Language) Software Installation (Environment Setup for Oracle on Window10)
More informationHW 2 Bench Table. Hash Indexes: Chap. 11. Table Bench is in tablespace setq. Loading table bench. Then a bulk load
Has Indexes: Cap. CS64 Lecture 6 HW Benc Table Table of M rows, Columns of different cardinalities CREATE TABLE BENCH ( KSEQ integer primary key, K5K integer not null, K5K integer not null, KK integer
More informationAuthor: Mounir Babari. Senior Technical Support Engineer UK. IBM B2B & Commerce - Industry Solutions. 1 Reclaiming wasted space in Oracle database
Reclaiming wasted space in Oracle database Author: Mounir Babari Senior Technical Support Engineer UK IBM B2B & Commerce - Industry Solutions 1 Reclaiming wasted space in Oracle database Reclaiming space
More informationOracle Tables TECHGOEASY.COM
Oracle Tables TECHGOEASY.COM 1 Oracle Tables WHAT IS ORACLE DATABASE TABLE? -Tables are the basic unit of data storage in an Oracle Database. Data is stored in rows and columns. -A table holds all the
More informationInterpreting Explain Plan Output. John Mullins
Interpreting Explain Plan Output John Mullins jmullins@themisinc.com www.themisinc.com www.themisinc.com/webinars Presenter John Mullins Themis Inc. (jmullins@themisinc.com) 30+ years of Oracle experience
More informationData about data is database Select correct option: True False Partially True None of the Above
Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another
More informationInsertions, Deletions, and Updates
Insertions, Deletions, and Updates Lecture 5 Robb T. Koether Hampden-Sydney College Wed, Jan 24, 2018 Robb T. Koether (Hampden-Sydney College) Insertions, Deletions, and Updates Wed, Jan 24, 2018 1 / 17
More informationDumpsKing. Latest exam dumps & reliable dumps VCE & valid certification king
DumpsKing http://www.dumpsking.com Latest exam dumps & reliable dumps VCE & valid certification king Exam : 1z1-062 Title : Oracle Database 12c: Installation and Administration Vendor : Oracle Version
More informationOracle Database In-Memory
Oracle Database In-Memory Mark Weber Principal Sales Consultant November 12, 2014 Row Format Databases vs. Column Format Databases Row SALES Transactions run faster on row format Example: Insert or query
More informationOracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-9 7 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training
More informationExam Name: Oracle 11i Applications DBA: Fundamentals I Exam Type Oracle Exam Code: 1z0-235 Total Questions: 108
Question: 1 You receive the following error while connecting to an Oracle9i database instance: ORA-12523 TNS:listener could not find instance appropriate for the client connection Which action would be
More informationSQL functions fit into two broad categories: Data definition language Data manipulation language
Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 7 Beginning Structured Query Language (SQL) MDM NUR RAZIA BINTI MOHD SURADI 019-3932846 razia@unisel.edu.my
More information1z Oracle9i Performance Tuning. Version 19.0
1z0-033 Oracle9i Performance Tuning Version 19.0 Important Note Please Read Carefully Study Tips This product will provide you questions and answers along with detailed explanations carefully compiled
More informationPhysical Design. Elena Baralis, Silvia Chiusano Politecnico di Torino. Phases of database design D B M G. Database Management Systems. Pag.
Physical Design D B M G 1 Phases of database design Application requirements Conceptual design Conceptual schema Logical design ER or UML Relational tables Logical schema Physical design Physical schema
More informationSQL Interview Questions
SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic
More informationOracle DB-Tuning Essentials
Infrastructure at your Service. Oracle DB-Tuning Essentials Agenda 1. The DB server and the tuning environment 2. Objective, Tuning versus Troubleshooting, Cost Based Optimizer 3. Object statistics 4.
More informationINDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables
INDEX Exercise No Title 1 Basic SQL Statements 2 Restricting and Sorting Data 3 Single Row Functions 4 Displaying data from multiple tables 5 Creating and Managing Tables 6 Including Constraints 7 Manipulating
More informationRAID in Practice, Overview of Indexing
RAID in Practice, Overview of Indexing CS634 Lecture 4, Feb 04 2014 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke 1 Disks and Files: RAID in practice For a big enterprise
More informationDatabase implementation Further SQL
IRU SEMESTER 2 January 2010 Semester 1 Session 2 Database implementation Further SQL Objectives To be able to use more advanced SQL statements, including Renaming columns Order by clause Aggregate functions
More informationORACLE 12C NEW FEATURE. A Resource Guide NOV 1, 2016 TECHGOEASY.COM
ORACLE 12C NEW FEATURE A Resource Guide NOV 1, 2016 TECHGOEASY.COM 1 Oracle 12c New Feature MULTITENANT ARCHITECTURE AND PLUGGABLE DATABASE Why Multitenant Architecture introduced with 12c? Many Oracle
More informationRNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague
seminář: Administrace Oracle (NDBI013) LS2017/18 RNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague Database structure Database
More informationDB2 SQL Class Outline
DB2 SQL Class Outline The Basics of SQL Introduction Finding Your Current Schema Setting Your Default SCHEMA SELECT * (All Columns) in a Table SELECT Specific Columns in a Table Commas in the Front or
More informationTablespaces and Datafiles
C H A P T E R 4 Tablespaces and Datafiles As you saw in Chapter 2, when you create a database, typically five tablespaces are created when you execute the CREATE DATABASE statement: SYSTEM SYSAUX UNDO
More informationOracle Syllabus Course code-r10605 SQL
Oracle Syllabus Course code-r10605 SQL Writing Basic SQL SELECT Statements Basic SELECT Statement Selecting All Columns Selecting Specific Columns Writing SQL Statements Column Heading Defaults Arithmetic
More informationOracle Hints. Using Optimizer Hints
Politecnico di Torino Tecnologia delle Basi di Dati Oracle Hints Computer Engineering, 2009-2010, slides by Tania Cerquitelli and Daniele Apiletti Using Optimizer Hints You can use comments in a SQL statement
More informationPrinciples of Data Management
Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what
More informationSQL Structured Query Language Introduction
SQL Structured Query Language Introduction Rifat Shahriyar Dept of CSE, BUET Tables In relational database systems data are represented using tables (relations). A query issued against the database also
More informationIndexing. Jan Chomicki University at Buffalo. Jan Chomicki () Indexing 1 / 25
Indexing Jan Chomicki University at Buffalo Jan Chomicki () Indexing 1 / 25 Storage hierarchy Cache Main memory Disk Tape Very fast Fast Slower Slow (nanosec) (10 nanosec) (millisec) (sec) Very small Small
More informationBasant Group of Institution
Basant Group of Institution Visual Basic 6.0 Objective Question Q.1 In the relational modes, cardinality is termed as: (A) Number of tuples. (B) Number of attributes. (C) Number of tables. (D) Number of
More informationOracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL]
Chapter Overview of PL/SQL Programs Control Statements Using Loops within PLSQL Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL] Table of Contents Describe a PL/SQL program construct List the
More informationLab # 4. Data Definition Language (DDL)
Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with
More informationQuery Processing and Query Optimization. Prof Monika Shah
Query Processing and Query Optimization Query Processing SQL Query Is in Library Cache? System catalog (Dict / Dict cache) Scan and verify relations Parse into parse tree (relational Calculus) View definitions
More informationMobile : ( India )
ORACLE DBA COURSE CONTENT : - INTRODUCTION TO ORACLE DBA What is DBA? Why a Company needs a DBA? Roles & Responsibilities of DBA Oracle Architecture Physical and Logical Phase of Database Types of files(control
More informationPERMANENT TABLESPACE MANAGEMENT:
PERMANENT TABLESPACE MANAGEMENT: A Tablespace is a logical storage which contains one or more datafiles. A database has mul8ple tablespaces to Separate user data from data dic8onary data to reduce I/O
More informationASSIGNMENT NO 2. Objectives: To understand and demonstrate DDL statements on various SQL objects
ASSIGNMENT NO 2 Title: Design and Develop SQL DDL statements which demonstrate the use of SQL objects such as Table, View, Index, Sequence, Synonym Objectives: To understand and demonstrate DDL statements
More informationCHAPTER. Tuning with Optimizer Plan Stability
CHAPTER 13 Tuning with Optimizer Plan Stability 310 Oracle High-Performance SQL Tuning T his chapter discusses the use of optimizer plan stability in Oracle8i and shows how you can improve the run-time
More informationDisaster Recovery: Restore Database from One Server to another Server when Different Location
Disaster Recovery: Restore Database from One Server to another Server when Different Location Mohamed Azar Oracle DBA http://mohamedazar.wordpress.com 1 Mohamed Azar http://mohamedazar.wordpress.com Step
More informationWhen should an index be used?
When should an index be used? Christian Antognini Trivadis AG Zürich, Switzerland Introduction One of the biggest problems tuning a SQL statement or judging if its execution plan is optimal, is to decide
More informationOracle9i DBA Fundamentals I
Oracle9i DBA Fundamentals I Volume 2 Student Guide D11321GC10 Production 1.0 May 2001 D32644 Authors Sarath Chandran Marie St. Gelais S Matt Taylor Jr Technical Reviewers Howard Bradley Ruth Baylis Paul
More information20 Essential Oracle SQL and PL/SQL Tuning Tips. John Mullins
20 Essential Oracle SQL and PL/SQL Tuning Tips John Mullins jmullins@themisinc.com www.themisinc.com www.themisinc.com/webinars Presenter John Mullins Themis Inc. (jmullins@themisinc.com) 30+ years of
More informationAn Introduction to DB2 Indexing
An Introduction to DB2 Indexing by Craig S. Mullins This article is adapted from the upcoming edition of Craig s book, DB2 Developer s Guide, 5th edition. This new edition, which will be available in May
More informationTotalCost = 3 (1, , 000) = 6, 000
156 Chapter 12 HASH JOIN: Now both relations are the same size, so we can treat either one as the smaller relation. With 15 buffer pages the first scan of S splits it into 14 buckets, each containing about
More informationOracle.ActualTests.1Z0-023.v by.Ramon.151q
Oracle.ActualTests.1Z0-023.v2009-03-18.by.Ramon.151q Number: 1Z0-023 Passing Score: 800 Time Limit: 120 min File Version: 33.4 http://www.gratisexam.com/ Oracle 1z0-023 Exam Exam Name: Architecture and
More informationChapter 3. Algorithms for Query Processing and Optimization
Chapter 3 Algorithms for Query Processing and Optimization Chapter Outline 1. Introduction to Query Processing 2. Translating SQL Queries into Relational Algebra 3. Algorithms for External Sorting 4. Algorithms
More informationDB2 MOCK TEST DB2 MOCK TEST I
http://www.tutorialspoint.com DB2 MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to DB2. You can download these sample mock tests at your local machine
More informationModule 9: Managing Schema Objects
Module 9: Managing Schema Objects Overview Naming guidelines for identifiers in schema object definitions Storage and structure of schema objects Implementing data integrity using constraints Implementing
More informationRNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague
course: Database Applications (NDBI026) WS2015/16 RNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague Schema modification Adding
More informationOracle 9i Application Development and Tuning
Index 2NF, NOT 3NF or BCNF... 2:17 A Anomalies Present in this Relation... 2:18 Anomalies (Specific) in this Relation... 2:4 Application Design... 1:28 Application Environment... 1:1 Application-Specific
More informationOracle Database 11g: SQL Tuning Workshop
Oracle University Contact Us: Local: 0845 777 7 711 Intl: +44 845 777 7 711 Oracle Database 11g: SQL Tuning Workshop Duration: 3 Days What you will learn This Oracle Database 11g: SQL Tuning Workshop Release
More informationRDBMS Topic 4 Adv. SQL, MSBTE Questions and Answers ( 12 Marks)
2017 RDBMS Topic 4 Adv. SQL, MSBTE Questions and Answers ( 12 Marks) 2016 Q. What is view? Definition of view: 2 marks) Ans : View: A view is a logical extract of a physical relation i.e. it is derived
More informationManaging an Oracle Instance
Managing an Oracle Instance Date: 07.10.2009 Instructor: SL. Dr. Ing. Ciprian Dobre 1 Objectives After completing this lesson, you should be able to do the following: Create and manage initialization parameter
More informationOracle Database 10g: Introduction to SQL
ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database
More informationExam code: Exam name: Database Fundamentals. Version 16.0
98-364 Number: 98-364 Passing Score: 800 Time Limit: 120 min File Version: 16.0 Exam code: 98-364 Exam name: Database Fundamentals Version 16.0 98-364 QUESTION 1 You have a table that contains the following
More informationCOSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan
COSC 304 Introduction to Database Systems SQL DDL Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca SQL Overview Structured Query Language or SQL is the standard query language
More informationOracle Database In-Memory
Oracle Database In-Memory Under The Hood Andy Cleverly andy.cleverly@oracle.com Director Database Technology Oracle EMEA Technology Safe Harbor Statement The following is intended to outline our general
More informationCHAPTER. Getting Started with the Oracle Architecture
CHAPTER 1 Getting Started with the Oracle Architecture 3 4 Oracle Database 11g DBA Handbook Oracle Database 11g is an evolutionary step from the previous release of Oracle 10g; Oracle 10g was, in turn,
More information1-2 Copyright Ó Oracle Corporation, All rights reserved.
1-1 The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any
More informationConstraints. Primary Key Foreign Key General table constraints Domain constraints Assertions Triggers. John Edgar 2
CMPT 354 Constraints Primary Key Foreign Key General table constraints Domain constraints Assertions Triggers John Edgar 2 firstname type balance city customerid lastname accnumber rate branchname phone
More information1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data
1 Writing Basic SQL SELECT Statements Objectives 1-2 Capabilities of SQL SELECT Statements 1-3 Basic SELECT Statement 1-4 Selecting All Columns 1-5 Selecting Specific Columns 1-6 Writing SQL Statements
More informationOracle 1Z0-053 Exam Questions & Answers
Oracle 1Z0-053 Exam Questions & Answers Number: 1Z0-053 Passing Score: 660 Time Limit: 120 min File Version: 38.8 http://www.gratisexam.com/ Oracle 1Z0-053 Exam Questions & Answers Exam Name: Oracle Database
More informationTo understand the concept of candidate and primary keys and their application in table creation.
CM0719: Database Modelling Seminar 5 (b): Candidate and Primary Keys Exercise Aims: To understand the concept of candidate and primary keys and their application in table creation. Outline of Activity:
More informationMicrosoft MOS- Using Microsoft Office Access Download Full Version :
Microsoft 77-605 MOS- Using Microsoft Office Access 2007 Download Full Version : http://killexams.com/pass4sure/exam-detail/77-605 QUESTION: 120 Peter works as a Database Designer for AccessSoft Inc. The
More informationMahathma Gandhi University
Mahathma Gandhi University BSc Computer science III Semester BCS 303 OBJECTIVE TYPE QUESTIONS Choose the correct or best alternative in the following: Q.1 In the relational modes, cardinality is termed
More informationORACLE 11gR2 DBA. by Mr. Akal Singh ( Oracle Certified Master ) COURSE CONTENT. INTRODUCTION to ORACLE
ORACLE 11gR2 DBA by Mr. Akal Singh ( Oracle Certified Master ) INTRODUCTION to ORACLE COURSE CONTENT Exploring the Oracle Database Architecture List the major architectural components of Oracle Database
More informationComponents of a DMBS
Query Optimisation Part 1 Query Optimisation Part 1 Brendan Tierney Components of a DMBS 2 1 3 Introduction In network and hierarchical DBMSs, low-level procedural query language is generally embedded
More informationDRAFT SOLUTION. Query 1(a) DATABASE MANAGEMENT SYSTEMS PRACTICE 1
DATABASE MANAGEMENT SYSTEMS PRACTICE 1 DRAFT SOLUTION Remark: Solutions in Algebra reflects the choices and the values returned by the Oracle Optimizer. Query 1(a) The Oracle optimizer prefers to use the
More informationDatabase Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved.
Database Foundations 6-3 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control
More informationHigh-Level Database Models (ii)
ICS 321 Spring 2011 High-Level Database Models (ii) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1 Logical DB Design: ER to Relational Entity sets to
More informationOracle 11g Invisible Indexes Inderpal S. Johal. Inderpal S. Johal, Data Softech Inc.
ORACLE 11G INVISIBLE INDEXES Inderpal S. Johal, Data Softech Inc. INTRODUCTION In this document we will work on another Oracle 11g interesting feature called Invisible Indexes. This will be very helpful
More informationOracle 1Z0-235 Exam Questions & Answers
Oracle 1Z0-235 Exam Questions & Answers Number: 1z0-235 Passing Score: 800 Time Limit: 120 min File Version: 26.5 http://www.gratisexam.com/ Oracle 1Z0-235 Exam Questions & Answers Exam Name: Oracle 11i
More informationGIFT Department of Computing Science. CS-217: Database Systems. Lab-4 Manual. Reporting Aggregated Data using Group Functions
GIFT Department of Computing Science CS-217: Database Systems Lab-4 Manual Reporting Aggregated Data using Group Functions V3.0 4/28/2016 Introduction to Lab-4 This lab further addresses functions. It
More informationIBM DB2 UDB V7.1 Family Fundamentals.
IBM 000-512 DB2 UDB V7.1 Family Fundamentals http://killexams.com/exam-detail/000-512 Answer: E QUESTION: 98 Given the following: A table containing a list of all seats on an airplane. A seat consists
More information