Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Performance Optimization.

Slides:



Advertisements
Similar presentations
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Advertisements

Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Chapter 10: Designing Databases
A Fast Growing Market. Interesting New Players Lyzasoft.
Semantec Ltd. Oracle Performance Tuning Boyan Pavlov Indexes Indexes.
IBM Software Group ® Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.
Chapter 3 Database Management
IS 4420 Database Fundamentals Chapter 6: Physical Database Design and Performance Leon Chen.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
INTEGRITY Enforcing integrity in Oracle. Oracle Tables mrobbert owner granted access.
Chapter 8 Physical Database Design. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Overview of Physical Database.
Passage Three Introduction to Microsoft SQL Server 2000.
Relational Database Performance CSCI 6442 Copyright 2013, David C. Roberts, all rights reserved.
Practical Database Design and Tuning. Outline  Practical Database Design and Tuning Physical Database Design in Relational Databases An Overview of Database.
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.
CSC271 Database Systems Lecture # 30.
IT The Relational DBMS Section 06. Relational Database Theory Physical Database Design.
Lecture 8 Index Organized Tables Clusters Index compression
Oracle Data Block Oracle Concepts Manual. Oracle Rows Oracle Concepts Manual.
1 © Prentice Hall, 2002 Physical Database Design Dr. Bijoy Bordoloi.
ISV Innovation Presented by ISV Innovation Presented by Business Intelligence Fundamentals: Data Loading Ola Ekdahl IT Mentors 9/12/08.
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
September 2011Copyright 2011 Teradata Corporation1 Teradata Columnar.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
Querying Large Databases Rukmini Kaushik. Purpose Research for efficient algorithms and software architectures of query engines.
1 Chapter 14 DML Tuning. 2 DML Performance Fundamentals DML Performance is affected by: – Efficiency of WHERE clause – Amount of index maintenance – Referential.
Chapter 16 Practical Database Design and Tuning Copyright © 2004 Pearson Education, Inc.
1 CS 430 Database Theory Winter 2005 Lecture 16: Inside a DBMS.
© Pearson Education Limited, Chapter 13 Physical Database Design – Step 4 (Choose File Organizations and Indexes) Transparencies.
1 Chapter 10 Joins and Subqueries. 2 Joins & Subqueries Joins – Methods to combine data from multiple tables – Optimizer information can be limited based.
Module 4 Database SQL Tuning Section 3 Application Performance.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Indexes and Views Unit 7.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Lec 7 Practical Database Design and Tuning Copyright © 2004 Pearson Education, Inc.
Chapter 8 Physical Database Design. Outline Overview of Physical Database Design Inputs of Physical Database Design File Structures Query Optimization.
Chapter 5 Index and Clustering
Session 1 Module 1: Introduction to Data Integrity
Creating Indexes on Tables An index provides quick access to data in a table, based on the values in specified columns. A table can have more than one.
1 Chapter 9 Tuning Table Access. 2 Overview Improve performance of access to single table Explain access methods – Full Table Scan – Index – Partition-level.
SCALING AND PERFORMANCE CS 260 Database Systems. Overview  Increasing capacity  Database performance  Database indexes B+ Tree Index Bitmap Index 
Table Structures and Indexing. The concept of indexing If you were asked to search for the name “Adam Wilbert” in a phonebook, you would go directly to.
11-1 © Prentice Hall, 2004 Chapter 11: Physical Database Design Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata RDBMS Concepts.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
SQL Basics Review Reviewing what we’ve learned so far…….
Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Physical Database Design Considerations.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Practical Database Design and Tuning
Indexes By Adrienne Watt.
CS 540 Database Management Systems
Physical Database Design and Performance
Database Performance Tuning &
Teradata Join Processing
Database Management Systems (CS 564)
Database Performance Tuning and Query Optimization
CHAPTER 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE
TERADATA RDBMS ARCHITECTURE
Practical Database Design and Tuning
Introduction to Teradata
Unit I-2.
Chapter 11 Database Performance Tuning and Query Optimization
Presentation transcript:

Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Performance Optimization

Performance Optimization Tools and Techniques  Performance Optimization Techniques –Indexes Choices –Macros & Views –Reducing Row Size – Compression –Optimization Through SQL Tuning –Join Indexes –Hash Indexes –Partitioned Primary Index –Priority Scheduler –Expanding your Teradata configuration.  Query Analysis Tools –Explain/Visual Explain Facility –Query Capture Facility –Target Level Emulation –Teradata System Emulation Tool –Teradata Index Wizard –Teradata Statistics Wizard  System Monitoring –Resource Usage –Teradata Manager

Indexes Types of Indexes supported by Teradata  Unique Primary Index  Non-Unique Primary Index  Unique Secondary Index  Non-Unique Secondary Index

Unique/Non-Unique Indexes A Unique Index identifies one & only one data row A Non-Unique Index identifies one or many data rows

Criteria For Index Selection Primary Index *The column (or column set) chosen should be the set selection most frequently used to select rows from the table and should be unique (UPI) or close to unique (NUPI). Cont...

Criteria For Index Selection Secondary Index *Secondary indexes always have an associated subtable. *The column (or column set) chosen should be a frequently used set selection. *Large Table/Small table Joins :  Joins that involve three or more small tables and one large table are called Large Table/Small Table (LT/ST) joins.  The optimizer first joins the small tables together and then joins that result with the large table (also called as Product/Merge Join).  To work well, the join fields of the small table must comprise an index of the large table. The join fields do not have to be indexes in the small table.  Collect statistics for all tables on their indexes used in a query.

Value Ordered NUSIs NUSI rows are stores row hash order which is very efficient for the queries with equality condition on the SI column(s). Queries with inequality conditions on the SI column(s) typically does full table scan of SI subtable. Value ordered NUSI rows are sorted by data value. It is possible to search only a portion of the index subtable for a given range of key values. Value-ordered NUSIs are very efficient for range queries.

Partitioned Primary Index Performance benefit from data locality is achieved by creating local partitions of data rows within each virtual AMP. Following performance benefits can be achieved by PPI  Large performance gain for range queries.  Improves load time.  Deleting entire partition is very fast.  PI access are not affected.

Explain Facility Allows you to experiment with different approaches to an answer, then select the one that performs best. Provides information about the relative time the query would take to execute.

Identifying Columns to Index Run EXPLAINs on typical queries with and without indexes defined on various columns to determine which performs best. Run HELP INDEX tablename statements to produce information helpful for interpreting the EXPLAIN statements you run. Cont….

Identifying Columns to Index Run COLLECT STATISTICS on the tables to be indexed to provide data for assessing the cost/benefit balance afforded by indexes.

Macros Teradata macros are SQL statements that are stored on the server and executed there. Macros are particularly useful for improving performance.

Views Views provide a means for application programmers to develop and test SQL statements that are highly optimized. These views can then be provided to users who can use them without worrying about tying up system resources needlessly. Well written macros provide the same facility.

Compressing Columns Most frequent value of a column can be compressed to reduce the row size. Tables with large numbers of rows and fields with limited numbers of unique values are very good candidates for compression. CPU cost overhead for compression processing is minimal.

Optimization Through SQL Tuning  Correlated Sub queries  Correlated sub queries are faster than use of a temporary table as Correlated sub queries fully integrated with the global join plan to minimize the cost.  Case Expression  CASE expressions help increase performance because they return multiple results in a single pass over the data. SELECT item_number, item_description, item_price as “Current//Price”,CASE WHEN item_season = ‘summer' and item_count < 3 THEN item_price *(1-.50) WHEN item_season = ‘summer’ and item_count >= 3 THEN item_price *(1-.25) WHEN item_season = ‘spring’ THEN item_price * (1-.33) ELSE NULL END AS “Sale//Price” FROM inventory_table WHERE item_season in (‘spring’ or ‘summer’); Cont….

Optimization Through SQL Tuning  Ordered Analytical Functions  Using Ordered Analytical Functions, you can perform data analysis within the database engine itself taking full advantage of Teradata parallel architecture.  CALENDAR view for date related operations.  Optimized Empty table INSERT/SELECT. INSERT INTO Summary_Table SELECT * FROM Store1; INSERT INTO Summary_Table SELECT * FROM Store2; INSERT INTO Summary_Table SELECT * FROM Store3; INSERT INTO Summary_Table SELECT * FROM Store1 ; INSERT INTO Summary_Table SELECT * FROM Store2 ;INSERT INTO Summary_Table SELECT * FROM Store3;

Join Indexes A Join Index is a data structure that stores and maintains join results. Frequently executed joins can be stored in Join Indexes to improve performance. Join Indexes are maintained automatically. Join Index -  Stores pre-joins without de-normalizing the database.  Stores summary data without de-normalizing the database.  Replicates the tables on the same AMP for join. Sparse Index - Can be used to index a portion of a table.

Hash Indexes Hash indexes create a full or partial replication of a base table with a primary index on a foreign key column table to facilitate joins of very large tables by hashing them to the same AMP. Eliminate data distribution for join processing.

Priority Scheduling Can be used to control resources allocated to users. Administrator can specify performance group while creating the user. It manages resource distribution to improve performance of one application at the expense of other. Resource Partition } R H M L Weight 40 Weight 20 Weight 10 Weight 5 Performance Group Allocation Group

Additional SMP/MPP Nodes You can increase the performance of a Teradata RDBMS by adding SMP nodes to your system. Performance increases at a nearly linear rate with the addition of SMP nodes to the configuration. Each MPP system is certified to support as many as 512 nodes. More nodes can be added on a custom basis to improve Performance.