Understanding Indexes in KB_SQL March 2001

Slides:



Advertisements
Similar presentations
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Advertisements

Shared Space Admin Demo March Admin demo introduces - Adding users Moderating users Moderating resources Adding communities and sub groups.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 10 – Designing.
Teradata Columnar: A new standard for Columnar databases Source: Teradata is thinking Big Stephen Swoyer Presented by: Deesha Phalak and Kaushiki Nag.
Database Theory Why use database? Data is a valuable corporate resource which needs adequate accuracy, consistency and security controls. The centralized.
Physical Database Monitoring and Tuning the Operational System.
A Guide to MySQL 7. 2 Objectives Understand, define, and drop views Recognize the benefits of using views Use a view to update data Grant and revoke users’
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
ANUA 2011, Ft. Lauderdale INTRO Position Control ANUA 2011, Ft. Lauderdale education solutions development inc.
Oracle Data Block Oracle Concepts Manual. Oracle Rows Oracle Concepts Manual.
Insight from Interactions 1 INSIGHT FROM INTERACTIONS
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 9 – Building Links,
Chapter 6 Database Administration
Views Lesson 7.
The Replica Location Service The Globus Project™ And The DataGrid Project Copyright (c) 2002 University of Chicago and The University of Southern California.
What are queries? Queries are a way of searching for and compiling data from one or more tables. Running a query is like asking a detailed question of.
Database Concepts Track 3: Managing Information using Database.
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,
Module 5: Implementing Merge Replication. Overview Understanding Merge Replication Architecture Implementing Conflict Resolution Planning and Deploying.
Session 1 Module 1: Introduction to Data Integrity
Chapter 4 Indexes. Indexes Logically represents subsets of data from one or more tables View Generates numeric valuesSequence Basic unit of storage; composed.
User Guide Contact for any
Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Performance Optimization.
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.
20 Copyright © 2008, Oracle. All rights reserved. Cache Management.
Database Project Team 4 Group c v Menna Hamza Mohamad Hesham Mona Abdel Mageed Yasmine Shaker.
Freeware Replication from Oracle Proof of Product For Postgres & Mysql.
Oracle Announced New In- Memory Database G1 Emre Eftelioglu, Fen Liu [09/27/13] 1 [1]
How to Send an Announcement. Welcome This tutorial will take you through the steps to introducing you and your new Local listing to members.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
Creating Indexes Database Systems Objectives Distinguish between the indexes that are created automatically and those that are created manually.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
CS522 Advanced database Systems Huiping Guo Department of Computer Science California State University, Los Angeles 3. Overview of data storage and indexing.
Just Enough Database Theory for Power Pivot / Power BI
IGCSE Business Studies Term 1
Databases Key Revision Points.
INLS 623– Database Systems II– File Structures, Indexing, and Hashing
Indexing Structures for Files and Physical Database Design
Physical Database Design
Open Source Server Side Scripting Permissions & Users
Objectives Create an action query to create a table
Shared Space Admin Demo
Moinuddin K. Qureshi ECE, Georgia Tech Gabriel H. Loh, AMD
Problem-Solving Steps Solve Problem-Solving Steps Solve
Index Structure.
Indexing Fundamentals
Welcome to SQL Saturday Denmark
Chapter 4 Indexes.
CH 4 Indexes.
China and the One Child Policy
Chapter 8 – Part II. A glimpse at indices and workloads
Please thank our sponsors!
A Guide to SQL, Eighth Edition
CH 4 Indexes.
Easily – Automatically - Intelligently

Creating and Managing Database Tables
Chapter 11: Indexing and Hashing
Views 1.
Database Management System
Query Optimization.
= x 2 = = 20 4 x 5 = = 16 4 x 4 = = 18 6 x 3 = = 12 2 x 6 = 12.
Eudora Customer Service Avail Our Quality Services Feel Free To Call US AT
Indexes and Performance
Data Independence Applications insulated from how data is structured and stored. Logical data independence: Protection from changes in logical structure.
Tutorial 9 Using Action Queries and Advanced Table Relationships
Who is Using your webSite?
Database 2.
Presentation transcript:

Understanding Indexes in KB_SQL March 2001 Just-in-Time Indexes March 2001 Understanding Indexes in KB_SQL March 2001

Learning Objectives What options do I have to improve query performance? The answer is…indexes. Review indexing strategies Introduce just-in-time indexes Discuss advantages and caveats

Improve Performance Why does my query run so slow?

Query Results

Show Plan/Stats: Query Run query with Show Plan and Show Stats

Show Plan: Results Note: No index being used

Show Stats: Results Note: Selecting 9 of 25000 rows searched

Show All Plans: Query Run query with SHOW_ALL_PLANS to see if index is available

Show All Plans: Results Note: No indexes available

Index Exists

Define Index to KB_SQL Add BY_NAME index in KB_SQL

New Show Plan Note: BY_NAME index is used, cost is reduced

New Show Stats Note: Selecting 9 of 9 rows searched

New Show All Plans Note: BY_NAME index available

How do we improve performance if we don’t have sufficient indexes? What are the options? Create supplemental table(s) Build index Create just-in-time index When will it be populated? How often should it be updated? Advantages and caveats?

Create Supplemental Tables Create new table Join to “base” table

Build the Index Benefits Caveats Queries only look at key data which results in faster searches Caveats Time Resources Additional globals to maintain

What if there is no index?

What if there is no index? (cont)

What if there is no index? (cont)

Just-in-Time Indexes When will the index be populated? How often should the index be updated?

Just-in-Time Indexes: Advantages and Caveats Advantages over traditional indexes Add only the indexes that the user demands Reduce wasted effort to build indexes that won’t be used Caveats Does not provide up-to-the-minute data accuracy 2 or more queries to realize benefit

Build the Just-in-Time Index

Define the Index to KB_SQL

New Show All Plans Note: Two indexes available; BY_SUPPLIER is accepted based on constraint

New Show Plan Note: BY_SUPPLIER index is used

New Show Stats Note: Selecting 4 of 4 rows searched

Summary Discussed options available to help improve query performance The answer is…indexes. Reviewed indexing strategies Introduced just-in-time indexes Discussed advantages and caveats