teradata statistics wizard
Post on 03-Jun-2018
216 Views
Preview:
TRANSCRIPT
-
8/12/2019 Teradata Statistics Wizard
1/120
Teradata Statistics WizardUser Guide
Release 14.10B035-2503-082K
October 2013
-
8/12/2019 Teradata Statistics Wizard
2/120
The product or products described in this book are licensed products of Teradata Corporation or its affiliates.
Teradata, Active Data Warehousing, Active Enterprise Intelligence, Applications-Within, Aprimo, Aprimo Marketing Studio, Aster, BYNET,Claraview, DecisionCast, Gridscale, MyCommerce, Raising Intelligence, Smarter. Faster. Wins., SQL-MapReduce, Teradata Decision Experts,"Teradata Labs" logo, "Teradata Raising Intelligence" logo, Teradata ServiceConnect, Teradata Source Experts, "Teradata The Best Decision Possible"logo, The Best Decision Possible, WebAnalyst, and Xkoto are trademarks or registered trademarks of Teradata Corporation or its affiliates in theUnited States and other countries.Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc.AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.Apache, Apache Hadoop, Hadoop, and the yellow elephant logo are either registered trademarks or trademarks of the Apache Software Foundationin the United States and/or other countries.Apple, Mac, and OS X all are registered trademarks of Apple Inc.Axeda is a registered trademark of Axeda Corporation. Axeda Agents, Axeda Applications, Axeda Policy Manager, Axeda Enterprise, Axeda Access,Axeda Software Management, Axeda Service, Axeda ServiceLink, and Firewall-Friendly are trademarks and Maximum Results and MaximumSupport are servicemarks of Axeda Corporation.Data Domain, EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.GoldenGate is a trademark of Oracle.Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.Hortonworks, the Hortonworks logo and other Hortonworks trademarks are trademarks of Hortonworks Inc. in the United States and othercountries.Intel, Pentium, and XEON are registered trademarks of Intel Corporation.IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation.Linux is a registered trademark of Linus Torvalds.LSI is a registered trademark of LSI Corporation.Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United Statesand other countries.NetVault is a trademark or registered trademark of Quest Software, Inc. in the United States and/or other countries.Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries.Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates.QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation.Quantum and the Quantum logo are trademarks of Quantum Corporation, registered in the U.S.A. and other countries.Red Hat is a trademark of Red Hat, Inc., registered in the U.S. and other countries. Used under license.SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc.SPARC is a registered trademark of SPARC International, Inc.Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States andother countries.Unicode is a registered trademark of Unicode, Inc. in the United States and other countries.UNIX is a registered trademark of The Open Group in the United States and other countries.Other product and company names mentioned herein may be the trademarks of their respective owners.
THEINFORMATIONCONTAINEDINTHISDOCUMENTISPROVIDEDONAN"AS-IS" BASIS, WITHOUTWARRANTYOFANYKIND, EITHEREXPRESSORIMPLIED, INCLUDINGTHEIMPLIEDWARRANTIESOFMERCHANTABILITY, FITNESSFORAPARTICULARPURPOSE, ORNON-INFRINGEMENT. SOMEJURISDICTIONSDONOTALLOWTHEEXCLUSIONOFIMPLIEDWARRANTIES, SOTHEABOVEEXCLUSION
MAYNOTAPPLYTOYOU. INNOEVENTWILLTERADATACORPORATIONBELIABLEFORANYINDIRECT, DIRECT, SPECIAL, INCIDENTAL,ORCONSEQUENTIALDAMAGES, INCLUDINGLOSTPROFITSORLOSTSAVINGS, EVENIFEXPRESSLYADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGES.
The information contained in this document may contain references or cross-references to features, functions, products, or services that are notannounced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features, functions,products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions, products, orservices available in your country.Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updatedwithout notice. Teradata Corporation may also make improvements or changes in the products or services described in this information at any timewithout notice.To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this document.Please email:teradata-books@lists.teradata.com.Any comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed non-confidential. TeradataCorporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform,create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, TeradataCorporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purpose whatsoever, includingdeveloping, manufacturing, or marketing products or services incorporating Feedback.
Copyright 2002-2013 by Teradata Corporation. All Rights Reserved.
mailto:teradata-books@lists.teradata.commailto:teradata-books@lists.teradata.com -
8/12/2019 Teradata Statistics Wizard
3/120
Teradata Statistics Wizard User Guide, Release 14.10 3
Preface
Purpose
This book provides information about TeradataStatistics Wizard, which is a TeradataTools
and Utilities product. Teradata Tools and Utilities are a group of products designed to work
with the Teradata Database.
Teradata Statistics Wizardis a graphical tool that can improve the performance of queries and,
as a result, the entire Teradata Database. It reduces the time to collect data and eliminates the
need for constant customizing.
Audience
This book is intended for use by:
Database Administrators
Other technical personnel who are familiar with statistics collection and will be using
Teradata Statistics Wizard.
Supported Releases
This book supports the following releases:
Teradata Database 14.10
Teradata Tools and Utilities 14.10
Teradata Statistics Wizard User Guide14.10.00.00
Note: See Version and copyright Information to verify the Teradata Statistics Wizard
User Guideversion number.
To locate detailed supported-release information:
1 Go to http://www.info.teradata.com/.2 Under Online Publications, click General Search.
3 Type 3119in the Publication Product ID box.
4 Under Sort By, select Date.
5 Click Search.
6 Open the version of the Teradata Tools and Utilities ##.# Supported Platforms and Product
Versionsspreadsheet associated with this release.
http://www.info.teradata.com/http://www.info.teradata.com/ -
8/12/2019 Teradata Statistics Wizard
4/120
Preface
Prerequisites
4 Teradata Statistics Wizard User Guide, Release 14.10
The spreadsheet includes supported Teradata Database versions, platforms, and product
release numbers.
Prerequisites
The following prerequisite knowledge is required for this product:
Teradata Database
Teradata Statistics Collection
MicrosoftWindowsoperating systems
Connectivity software, such as ODBC or CLI
Changes to This Book
The following changes were made to this book in support of the current release. Changes are
marked with change bars. For a complete list of changes to the product, see the Teradata Tools
and Utilities Release Definitionassociated with this release.
Additional Information
Additional information that supports this product and Teradata Tools and Utilities is available
at the web sites listed in the table that follows.
Date Description
October 2013Version 14.10
Unicode glossary entry updated.
March 2013Version 14.10
Removed all occurrences of the book title reference mmyx.
Statistics display interface should show additional data items introduced inTD14.0 statistics
Display appropriate headers for statistics data: normal column statistics asopposed to column partitioning statistics
November 201114.00
Changed all occurrences of 14.00.01 to 14.00, updated Supported Releases,removed Teradata Database 14.0 footnote.
Added hyphens to UTF8 and UTF16.
Chapter 6: Added Low Frequency column in Interval Statistics window. SeeTo modify interval data on page 100.
-
8/12/2019 Teradata Statistics Wizard
5/120
Preface
Additional Information
Teradata Statistics Wizard User Guide, Release 14.10 5
Type of Information Description Access to Information
Release overview
Late information
Use the Release Definition for the followinginformation:
Overview of all of the products in therelease
Information received too late to beincluded in the manuals
Operating systems and TeradataDatabase versions that are certified towork with each product
Version numbers of each product andthe documentation for each product
Information about available trainingand the support center
1 Go to http://www.info.teradata.com/.
2 Under Online Publications, click General Search.
3 Type 2029in the Publication Product IDbox.
4 Click Search.
5 Select the appropriate Release Definition fromthe search results.
http://www.info.teradata.com/http://www.info.teradata.com/ -
8/12/2019 Teradata Statistics Wizard
6/120
Preface
Additional Information
6 Teradata Statistics Wizard User Guide, Release 14.10
Additional productinformation
Use the Teradata Information Products website to view or download specific manualsthat supply related or additional
information to this manual.
1 Go to http://www.info.teradata.com/.
2 Under the Online Publicationssubcategory,
Browse by Category , click Data Warehousing.
3 Do one of the following:
For a list of Teradata Tools and Utilitiesdocuments, click Teradata Tools and Utili ties,and then select an item under Releases orProducts.
Select a link to any of the data warehousingpublications categories listed.
Specific books related to Teradata Statistics WizardUser Guideare as follows:
Data Dictionary(B035-1092)
Database Administration(B035-1093)
ODBC Driver for Teradata User Guide(B035-2509)
SQL Request and Transaction Processing(B035-1142)
SQL Data Definition Language(B035-1144)
Teradata Call-Level Inter face Version 2 Referencefor Network-Attached Systems(B035-2417)
Teradata Index Wizard User Guide(B035-2506)
Teradata Manager User Guide
(B035-2428) Teradata System Emulation Tool User Guide
(B035-2492)
Teradata Tools and Utilities for MicrosoftWindows Installation Guide(B035-2407)
Teradata Visual Explain User Guide(B035-2504)
Utilities(B035-1102)
Type of Information Description Access to Information
http://www.info.teradata.com/http://www.info.teradata.com/ -
8/12/2019 Teradata Statistics Wizard
7/120
Preface
Additional Information
Teradata Statistics Wizard User Guide, Release 14.10 7
Additional productinformation(continued)
Teradata Query Scheduler User Guide(B035-2512)
Teradata Query Scheduler Administrator Guide
(B035-2511) Teradata Statistics Wizard User Guide(B035-
2503)
Messages(B035-1096)
Teradata SQL Assistant for Microsoft WindowsUser Guide(B035-2430)
International Character Set Support(B035-1125)
CD-ROM images Access a link to a downloadable CD-ROMimage of all customer documentation for
this release. Customers are authorized tocreate CD-ROMs for their use from thisimage.
1 Go to http://www.info.teradata.com/.
2 Under the Online Publicationssubcategory,
Browse by Category , click Data Warehousing.3 Click CD-ROM Images.
4 Follow the ordering instructions.
Orderinginformation formanuals
Use the Teradata Information Products website to order printed versions of manuals.
1 Go to http://www.info.teradata.com/.
2 Under Print & CD Publications, click How toOrder.
3 Follow the ordering instructions.
General informationabout Teradata
The Teradata home page provides links tonumerous sources of information aboutTeradata. Links include:
Executive reports, case studies ofcustomer experiences with Teradata,and thought leadership
Technical information, solutions, andexpert advice
Press releases, mentions, and mediaresources
1 Go to Teradata.com.
2 Select a link.
Type of Information Description Access to Information
http://www.info.teradata.com/http://www.info.teradata.com/http://www.teradata.com/t/resourceshttp://www.teradata.com/t/resourceshttp://www.info.teradata.com/http://www.info.teradata.com/ -
8/12/2019 Teradata Statistics Wizard
8/120
Preface
Additional Information
8 Teradata Statistics Wizard User Guide, Release 14.10
-
8/12/2019 Teradata Statistics Wizard
9/120
Teradata Statistics Wizard User Guide, Release 14.10 9
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Supported Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Changes to This Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Chapter 1:Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
How Does Teradata Statistics Wizard Work?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Using Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 2:Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Before You Begin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Steps for Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Teradata Statistics Wizard Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Menus and Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
View Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Script Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Workload Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Tools Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Tools Menu When the Interval Statistics Pane is Open . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Window Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
-
8/12/2019 Teradata Statistics Wizard
10/120
Table of Contents
10 Teradata Statistics Wizard User Guide, Release 14.10
Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Version and Copyright Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
Connectivity Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
General Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30Recommendations Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
Workload Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Table Pane Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
Workload Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Launching the Teradata Statistics Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Connecting to a Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Selecting a Logon Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Connecting Through ODBC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Connecting Through CLIv2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Retrieving Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40Searching for a Database, Table, or Column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Set Up a Query Capture Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
View Low Level Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
Chapter 3:Defining Workloads, Creating and Applying StatisticsRecommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Defining a Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Defining a Workload From DBQL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
Defining a Workload Using Statement Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Defining a Workload From QCD Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Importing a Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Defining From an Existing Workload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Definition Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
Updating an Existing Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
Cleaning up Workloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
Creating the Statistics Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
Applying the Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
-
8/12/2019 Teradata Statistics Wizard
11/120
Table of Contents
Teradata Statistics Wizard User Guide11
Chapter 4:Statistics Analysis Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Selecting a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Statistics Recommendations Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Update Frequency Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Table Usage Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Table Scan Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Workload Analysis Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Displaying Reports From a Previously Analyzed Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Chapter 5:Options for Non-Workload Recommendations and DataRetrieval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Full or Sampled Statistics Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Getting Full Statistics Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Getting Sampled Statistics Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Statistics Collection Recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Collection Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Statistics Re-Collection Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Re-Collection Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Retrieving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Recommendation Icons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Viewing, Executing, or Scheduling Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Viewing Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Executing Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Scheduling Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Copy Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Chapter 6:
Managing Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Collecting, Re-Collecting, or Dropping Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Collecting Statistics at the Column Level. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Re-Collecting or Dropping Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Partition Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Creating a Script for Deferred Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Displaying and Modifying the Interval Statistics for a Column or Index . . . . . . . . . . . . . . . 100
-
8/12/2019 Teradata Statistics Wizard
12/120
Table of Contents
12 Teradata Statistics Wizard User Guide, Release 14.10
History of Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
Loner Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
Column Partition Statistics Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
Entering Statistics for Multiple Intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
-
8/12/2019 Teradata Statistics Wizard
13/120
Teradata Statistics Wizard User Guide, Release 14.10 13
List of Figures
Figure 1: Panes in the Teradata Statistics Wizard window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 2: Interface with Menu Bar and Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 3: Options Dialog Box with Connectivity Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 4: Options Dialog Box with General Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 5: Options Dialog Box with Recommendations Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 6: Options Dialog Box with Workload Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 7: Options Dialog Box with Table Pane Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 8: Database Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 9: Setup QCD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Figure 10: Define Workload from DBQL Statements Screen . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Figure 11: Select Criteria Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Figure 12: Select Users and Accounts Selection Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Figure 13: Workload Definition via DBQL Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 14: Statement Text Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Figure 15: Define Workload using Statements Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Figure 16: Input USING Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Figure 17: Define Workload from QCD Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 18: Import Options Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Figure 19: Create from Existing Workload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Figure 20: Workload Definition Summary Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Figure 21: Workload Clean Up Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Figure 22: Statistics Recommendation Report Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Figure 23: Execute/Schedules Recommendations Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Figure 24: Execution Results Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Figure 25: Teradata Statistics Wizard Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Figure 26: Selected Report Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Figure 27: Statistics Recommendation Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 28: Update Frequency Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Figure 29: Table Usage Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Figure 30: Table Scan Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Figure 31: Workload Analysis Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Figure 32: View Reports Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
-
8/12/2019 Teradata Statistics Wizard
14/120
List of Figures
14 Teradata Statistics Wizard User Guide, Release 14.10
Figure 33: Select Recommendations Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74
Figure 34: Select Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
Figure 35: Select Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
Figure 36: Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
Figure 37: Select Recommendations Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Figure 38: Select Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82
Figure 39: Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83
Figure 40: Updated table pane example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86
Figure 41: Recommendations table dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88
Figure 42: Column Recommendations dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
Figure 43: Column/Index pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
Figure 44: Schedule Recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
Figure 45: Copy Statistics Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95Figure 46: Column/Index Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
Figure 47: Interval Statistics Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
Figure 48: HIstory of Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
Figure 49: Column Partition Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107
Figure 50: Add/Modify Intervals Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
-
8/12/2019 Teradata Statistics Wizard
15/120
Teradata Statistics Wizard User Guide, Release 14.10 15
List of Tables
Table 1: File Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 2: Edit Menu Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 3: View Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 4: Script Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 5: Workload Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 6: Tools Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 7: Tools Menu Commands - Interval Statistics Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table 8: Window Menu Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table 9: Help Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Table 10: About Teradata Statistics Wizard Dialog Box Description. . . . . . . . . . . . . . . . . . . . 29
Table 11: Connectivity tab options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Table 12: General tab options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Table 13: Recommendations tab options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Table 14: Workload tab options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Table 15: Table Pane tab options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 16: Workload Toolbar options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Table 17: Definition Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Table 18: Statistics Recommendation Report Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Table 19: Update Frequency Report Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Table 20: Table Usage Report Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Table 21: Table Scan Report Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Table 22: Workload Analysis Report Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Table 23: Setting Options to Retrieve Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Table 24: Table Pane Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Table 25: Recommendation Icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Table 26: Schedule Recommendation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Table 27: Collecting Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Table 28: Re-Collecting or Dropping Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Table 29: Collecting Partition Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Table 30: History of Summary Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
-
8/12/2019 Teradata Statistics Wizard
16/120
List of Tables
16 Teradata Statistics Wizard User Guide, Release 14.10
-
8/12/2019 Teradata Statistics Wizard
17/120
Teradata Statistics Wizard User Guide, Release 14.10 17
CHAPTER 1
Introduction
As the Teradata Database becomes more powerful and complex, applications and the queries
they perform have also become more complex and sophisticated. The Teradata Statistics
Wizard is a graphical tool that can improve the performance of queries and, as a result, the
entire Teradata Database. It reduces the time to collect data and eliminates the need for
constant customization activity.
Teradata Statistics Wizard accomplishes this by automating the process of collecting statistics
for a particular workload or selecting arbitrary indexes or columns for collection/re-collection
purposes. Additionally, you can validate the proposed statistics on a production system whichenables you to verify the performance of the proposed statistics before applying the
recommendations.
Teradata Statistics Wizard enables the database administrator (DBA) to:
Specify a workload to be analyzed for recommendations specific to improving the
performance of the queries in a workload.
Select an arbitrary database or selection of tables, indexes, or columns for analysis,
collection, or re-collection of statistics.
Make recommendations, based on a specific workload.
Make recommendations, based on table demographics and general heuristics.
Defer executing the collection and dropping of statistics and schedule for a later time.
Display and modify the interval statistics for a column or index.
As changes are made within a database, Teradata Statistics Wizard identifies those changes and
recommends which tables to have statistics collected, based on age of data and table growth,
and which columns/indexes would benefit from having statistics defined and collected for a
specific workload. The DBA is then given the opportunity to accept or reject the
recommendations.
To learn more about Teradata Statistics Wizard, read:
Chapter 1: Introduction
Chapter 2: Getting Started
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Chapter 4: Statistics Analysis Reports
Chapter 5: Options for Non-Workload Recommendations and Data Retrieval
Chapter 6: Managing Statistics
-
8/12/2019 Teradata Statistics Wizard
18/120
Chapter 1: Introduction
How Does Teradata Statistics Wizard Work?
18 Teradata Statistics Wizard User Guide, Release 14.10
How Does Teradata Statistics Wizard Work?
Teradata Statistics Wizard analyzes the workload (SQL statements) given to the system. A
workload is a set of queries that can be defined in any of the following ways:
Creating queries from the DBQL. See Defining a Workload From DBQL Statements on
page 45.
Manually entering the queries or loading queries from a file. See Defining a Workload
Using Statement Text on page 49.
Creating queries from the Query Capture Database (QCD). See Defining a Workload
From QCD Statements on page 52.
Creating queries from another workload. See Defining From an Existing Workload on
page 58.
Importing a workload from Teradata SET. See Importing a Workload on page 54.
When statistics are chosen by the system, Teradata Statistics Wizard makes recommendationsand provides reports to help you analyze the recommendations for collection purposes.
Additionally, Teradata Statistics Wizard permits you to validate the proposed statistics on a
production system which enables you to verify the performance of the proposed statistics
before applying the recommendations.
Teradata Statistics Wizard can be used in two modes:
Defined Workload Recommendations. See Chapter 3 Defining Workloads, Creating and
Applying Statistics Recommendations on page 43.
Arbitrary Selection Recommendations. See Chapter 5 Options for Non-Workload
Recommendations and Data Retrieval on page 73and Chapter 6 Managing Statistics
on page 97.
Online Help
Using Online Help
Teradata Statistics Wizard online help answers questions about how to use Teradata Statistics
Wizard features. Online help (including context-sensitive help) opens in a new browser
window. Microsoft Internet Explorer, version 6.0 or later, is the recommended browser for
viewing online help and context-sensitive help. A browser other than the recommended
browser might result in incorrectly displayed help.
To open Help
From the toolbar, click .
Once the Help window is open, you can navigate to or search for other topics.
-
8/12/2019 Teradata Statistics Wizard
19/120
Chapter 1: Introduction
Online Help
Teradata Statistics Wizard User Guide, Release 14.10 19
To get Help within a window or dialog box
From most windows and dialog boxes, press F1to see context-sensitive Help for the
window or dialog box you are looking at. Occasionally when F1will not invoke Help, press
Shi f t + F1.
-
8/12/2019 Teradata Statistics Wizard
20/120
Chapter 1: Introduction
Online Help
20 Teradata Statistics Wizard User Guide, Release 14.10
-
8/12/2019 Teradata Statistics Wizard
21/120
Teradata Statistics Wizard User Guide, Release 14.10 21
CHAPTER 2
Getting Started
Before using Teradata Statistics Wizard, read the following topics:
Before You Begin
Steps for Best Practices
User Interface
Menu Bar
Options
Workload Toolbar Launching the Teradata Statistics Wizard
Connecting to a Database
Retrieving Statistics
Searching for a Database, Table, or Column
Before You Begin
Install the latest version of Teradata Visual Explain.
For information, refer to the Teradata Tools and Utilities for Microsoft Windows Installation
GuideB035-2407.
Install the latest version of connectivity software, either ODBC or CLIv2.
Check with your network administrator on their preference.
After choosing the connectivity software, specify the database to be used during the logon
process. For information, see Connecting to a Database on page 38.
To view or download the documents referenced in this user guide, see Additional
Information on page 4.
Steps for Best Practices
Identify the set of SQL statements that must be analyzed for performance improvements.
Define the identified set of SQL statements. This will be known as a workload.
Run the statistics analysis.
Validate the statistics.
Apply or schedule the execution of the recommendations.
-
8/12/2019 Teradata Statistics Wizard
22/120
Chapter 2: Getting Started
User Interface
22 Teradata Statistics Wizard User Guide, Release 14.10
User Interface
The Teradata Statistics Wizard window displays Teradata Database statistics in three panes.
The following figure is a typical view of the Teradata Statistics Wizard window.
Figure 1: Panes in the Teradata Statistics Wizardwindow
Teradata Statistics Wizard Window
Database Pane
The Databasepane is a listing of all the databases on the system and is located in the left
navigation pane of the window. Double-click on a database icon to see the children of that
database and to retrieve the associated tables.
Table Pane
The Tablepane lists the tables contained in the selected database and is located in the center
portion of the window. Double-click a table name to see the statistics for that table.
-
8/12/2019 Teradata Statistics Wizard
23/120
Chapter 2: Getting Started
Menu Ba
Teradata Statistics Wizard User Guide, Release 14.10 23
Column/Index Pane
TheColumn/Indexpane shows statistics for the selected database/table and is located in the
center portion of the window. Double-click a column name to see the interval statistics for
that column.
Menus and Toolbars
The interface consists of the following:
The Menu Bar, located along the top of the window, provides access to all the commands
you use to operate Teradata Statistics Wizard.
The toolbar, located under the menu bar, contains tool buttons you can click to quickly
perform many of the common commands found in the menu bar.
The Workload Toolbar, located along the left side of the window, contains tool buttons
you can click to perform operations specific to the workload statistics features.
Figure 2: Interface with Menu Bar and Toolbars
Menu Bar
The menu bar is located at the top of the Teradata Statistics Wizard window and contains
menus displaying the commands to operate Teradata Statistics Wizard.
In addition to accessing the commands from the menu bar, Teradata Statistics Wizard
provides shortcuts to many commands with the tool buttons along the top and left side of the
Menu
Toolbar
Workload
Toolbar
-
8/12/2019 Teradata Statistics Wizard
24/120
Chapter 2: Getting Started
Menu Bar
24 Teradata Statistics Wizard User Guide, Release 14.10
window. The next sections provide descriptions of the menu commands, as well as their
corresponding tool buttons.
File Menu
Edit Menu
View Menu
Script Menu
Workload Menu
Tools Menu
Window Menu
Help Menu
File Menu
The Filemenu provides commands for connecting and disconnecting from the database, as
well as loading, saving, and printing statistics. This is also the menu used to exit TeradataStatistics Wizard.
Edit Menu
The Editmenu provides commands that undo, cut, copy, paste, find and replace.
Note: All commands, except Find, are only available when the Script window is open. The
Find command is also available when the database pane, table pane, or column pane is open.
Table 1: File Menu Commands
Menu CommandToolbarButton Description
Connect Connects to the Teradata Database server.
Disconnect Disconnects from the Teradata Database server.
Save As Saves the report as the required file.
Print Prints the report.
Note: The Print option is only available when the Tablepane, Column pane, or Script window is open.
Print Setup Sets the printer options
Exit Exits Teradata Statistics Wizard
-
8/12/2019 Teradata Statistics Wizard
25/120
Chapter 2: Getting Started
Menu Ba
Teradata Statistics Wizard User Guide, Release 14.10 25
View Menu
The Viewmenu provides commands that modify the display of the tool bars and status bar.
Script Menu
The Scriptmenu provides commands to record or erase previously recorded scripts. Also, you
can defer the execution of previously-recorded scripts.
Table 2: Edit Menu Commands
Menu CommandToolbarButton Description
Undo Undoes the last edit.
Cut Cuts the current selection to the clipboard.
Copy Copies the current selection to the clipboard.
Paste Pastes the contents of the clipboard at the insertion point.
Find Finds a text string in the current document.
Replace Replaces a found text string in the current document withanother one.
Table 3: View Menu Commands
Menu Command Description
Toolbar Toggles the toolbar and the workload toolbar on or off.
Status Bar Toggles the status bar on or off.
Font Change the font and size of the characters used in the displays
Table 4: Script Menu Commands
Menu Command Description
New Opens a new script for recording.
Turn Record ON Begins recording a script.
Clear Erases all the text in the Script window.
Submit for Deferred Execution Submits a script for execution some time in the future.
-
8/12/2019 Teradata Statistics Wizard
26/120
Chapter 2: Getting Started
Menu Bar
26 Teradata Statistics Wizard User Guide, Release 14.10
Workload Menu
The Workload menu provides commands to create, update, and clean up workloads; create a
new analysis and restart an analysis; select workload reports; validate recommendations; and
execute or schedule recommendations.
Tools Menu
The Toolsmenu provides commands to select arbitrary databases, tables, or indexes/columnsand collect or drop statistics, retrieve tables, change display options, and update selected
columns or indexes with selected interval values.
Refresh Refreshes the script window with the content of the recording.
Table 4: Script Menu Commands (continued)
Menu Command Description
Table 5: Workload Menu Commands
Menu Command Description
Workload > Create Creates a workload.
Workload > Update Existing Workload Modifies an existing workload.
Workload > Workload Cleanup Deletes a workload and/or the analysis made on theworkload.
Reports > Current Workload Displays the reports of the last analyzed workload.
Reports > Select Workload Displays reports from a previously analyzed workload.
Execute/Schedule Recommendations Executes or schedules the recommendations after theyhave been accepted.
Table 6: Tools Menu Commands
Menu CommandToolbarButton Description
Collect Statistics >Single Column/Index For Selected
Collects statistics on the currently selected items.
Collect Statistics >Single-Column/Index SampledFor Selected
Collects sampled single-column statistics (versusnon-sampled statistics) for the selected items.
Collect Statistics >Multi-Columns From Selected
Collects multiple-column statistics from selecteditems.
-
8/12/2019 Teradata Statistics Wizard
27/120
-
8/12/2019 Teradata Statistics Wizard
28/120
Chapter 2: Getting Started
Menu Bar
28 Teradata Statistics Wizard User Guide, Release 14.10
Tools Menu When the Interval Statistics Pane is Open
Window Menu
The Windowmenu provides commands to arrange the windows and icons at the bottom of the
window.
Help Menu
The Helpmenu provides commands to access the Teradata Statistics Wizard online Help.
Options Changes display options.
For more details, see Options on page 30.
Table 6: Tools Menu Commands (continued)
Menu CommandToolbarButton Description
Table 7: Tools Menu Commands - Interval Statistics Pane
Menu Command Description
Options Changes display options.
For descriptions of these options, see Options on page 30.
Table 8: Window Menu Commands
Menu Command Description
Cascade Arranges the windows so they overlap.
Tile Arranges the windows as non-overlapping tiles.
Arrange Icons Arranges the icons at the bottom of the window.
Refresh Refreshes the current window pane (Databases, Tables, or Columns/Indexes).
Table 9: Help Menu Commands
Menu Command Toolbar Button Description
Help Topics Display a list of Help topics
About Teradata Statistics Wizard See Version and Copyright Information onpage 29.
-
8/12/2019 Teradata Statistics Wizard
29/120
Chapter 2: Getting Started
Menu Ba
Teradata Statistics Wizard User Guide, Release 14.10 29
Version and Copyright Information
TheAbout Teradata Statist ics Wizard dialog box, displays the version and copyright
information for the software.
To open the About Teradata Statis tics Wizard dialog box
Click Help > About Teradata Statist ics Wizard.
Copyright dates and legal notices are also provided.
Table 10: About Teradata Statistics Wizard Dialog Box Description
Field Description
Version Version number of the software installed.
Date Created Date the installed version of software was created.
System System name of the current connection.
Note: This information appears only when connected to a Teradata
Database.
Connection Type The connectivity type is indicated as one of the following:
ConnectedODBCwhen connected to Teradata Database with ODBCconnectivity.
Connected - CLIwhen connected to Teradata Database using CLIconnectivity.
Not Connectedwhen not connected to Teradata Database.
Character Set Displays the session character set used to connect to the Teradata Database
Note: This information appears only when connected to a Teradata
Database.
User Name of the currently connected user.
Note: This information appears only when connected to a TeradataDatabase.
Database Version Version level of the connected Teradata Database.
Note: This information appears only when connected to a Teradata
Database.
Database Release Release level of the connected Teradata Database.
Note: This information appears only when connected to a TeradataDatabase.
Copyright The current copyright statement.
-
8/12/2019 Teradata Statistics Wizard
30/120
Chapter 2: Getting Started
Options
30 Teradata Statistics Wizard User Guide, Release 14.10
Options
Options are available for connectivity, recommendations, workload, and table pane as well as
enabling table level statistics.
To open the Options dialog box
1 ClickTools > Options .
The Optionsdialog box appears and presents options within tabs. These options are
described in the tables that follow.
2 Make selections and clickApply.
3 Click OKto close the Options dialog box.
Connectivity TabThe following table describes the options in the Connectivitytab.
Figure 3: Options Dialog Box with Connectivity Tab
General Tab
The following table describes the option in the Generaltab.
Table 11: Connectivity tab options
Option Button Description
ODBC Connects to the Teradata Database using ODBC.
CLIv2 Connect to the Teradata Database using CLIv2.
-
8/12/2019 Teradata Statistics Wizard
31/120
Chapter 2: Getting Started
Options
Teradata Statistics Wizard User Guide, Release 14.10 31
Figure 4: Options Dialog Box with General Tab
Recommendations Tab
The following table describes the options in the Recommendationstab. Each category within
the Recommendationstab is associated with a different icon. These icons are used in
subsequent reports to indicate the type of recommendations that are available, based on the
options selected.
Table 12: General tab options
Check box Description
Enable Table Level Statistics (All DB) Menu Item Enables the menu item to include statistics at the
table level within all databases.
Default Perm Space for QCD creation (MB) The space for the QCD that is created duringworkload creation.
Table 13: Recommendations tab options
Option Description Icon displayed
Age Of Co llect ion When selected, theAge of Col lec tion check boxgives recommendations based on the numberof days since statistics were last collected.
-
8/12/2019 Teradata Statistics Wizard
32/120
Chapter 2: Getting Started
Options
32 Teradata Statistics Wizard User Guide, Release 14.10
Table Growth When selected, the Table Growthcheck boxgives recommendations based on the change
in the percentage of table growth sincestatistics were last collected.
Table Skew
Al l Non-Un ique Pr imaryIndexes
Al l Non-Un ique SecondaryIndexes
Gives recommendations based on the tableskew.
General Heuristics
Al l Indexes for Jo in Index(table)
Al l Non-Un ique SecondaryIndexes (ALL Option)
Al l VOSI (Value Ordered NUSI)
Al l Par ti tioned Tables
Primary Index/Key
Al l Foreign Key(s)
Gives recommendations based on somegeneral rules of thumb.
Gives recommendations based on somegeneral rules of thumb.
Gives recommendations based on somegeneral rules of thumb.
When checked, Teradata Statistics Wizardrecommends collecting statistics for allpartitioned tables that do not havepartition statistics.
When checked, Teradata Statistics Wizardrecommends collecting statistics for tablesthat have a primary index/key column thatdoes not contain statistics.
When checked, Teradata Statistics Wizardrecommends collecting statistics for tables
that have a foreign key column that doesnot contain statistics.
Note: If a table is partitioned by a singlecolumn, column statistics are inherited as
partition statistics by the Teradata Databaseand a partition statistics recommendation
will not be generated.
Table 13: Recommendations tab options (continued)
Option Description Icon displayed
-
8/12/2019 Teradata Statistics Wizard
33/120
Chapter 2: Getting Started
Options
Teradata Statistics Wizard User Guide, Release 14.10 33
Figure 5: Options Dialog Box with Recommendations Tab
Workload Tab
The following table describes the options in the Workload Tab. Go to Creating Restricted
Views on page 34for more information on using X views.
Table 14: Workload tab options
Check box Description
Use X views (DBC and QCD) Retrieve dictionary information and QCD data using X views.
Use X views (QCD only) Retrieve data from the QCD using X views.
-
8/12/2019 Teradata Statistics Wizard
34/120
Chapter 2: Getting Started
Options
34 Teradata Statistics Wizard User Guide, Release 14.10
Figure 6: Options Dialog Box with Workload Tab
Creating Restricted Views
Restricted DBC database views can be created to limit access to information. Restricted DBC
views are identified by the suffixXand called X views.
Beginning with Teradata Database 12.00.00, each system view in the DBC database includes a
view that supports Unicode. All Unicodesystem views are identified by a suffix, Vor VX,
when a restricted Unicodeview is used.
Note: To learn more about X views, V views, and VX views, see Data DictionaryB035-1092
and Database AdministrationB035-1093.
See Workload TabWorkload Tab on page 33to access the Use X viewsoptions.
Additional Restricted views required by Teradata Statistics Wizard must be created in Teradata
Database. Teradata Statistics Wizard creates restricted views from a script file. There are five
versions of the script file:
DBCXViews62.bteq;used on Teradata Database V2R6.2, V2R6.1, or V2R6.0
DBCVXViews120.bteq ; used on Teradata Database 12.00.00
DBCVXViews130.bteq ; used on Teradata Database 13.00.00 and 13.10.00
DBCVXViews140.bteq ; used on Teradata Database 14.0
DBCVXViews141.bteq ; used on Teradata Database 14.10 and later
The script files are located in the Teradata installation folder. For example:
C:\Program Files\Teradata\Teradata Statistics Wizard 14.10\DBCXViews1410.bteq
-
8/12/2019 Teradata Statistics Wizard
35/120
Chapter 2: Getting Started
Options
Teradata Statistics Wizard User Guide, Release 14.10 35
To create restricted views
1 Click Tools > Options.
The Optionsdialog box appears.
2 Click the Workload tab.
3 Select Use X views (DBC and QCD).
4 Connect to the Teradata Database.
A confirmation message appears.
5 Click Yesto create restricted views, or Noto proceed using Non X views.
If you clicked No, a confirmation message appears. Click OK.
Table Pane Tab
The following table describes the options in the Table Panetab.
Table 15: Table Pane tab options
Option Description
Retrieve Statistics for All Tables Automatically retrieves statistics for all tables in the selecteddatabase, as statistics influence all recommendations made byTeradata Statistics Wizard.
Retrieve Statistics for All Tables
and
Retrieve Perm Space for All
Tables
Select both of these options to automatically retrieve permspace usage for all tables in the selected database, as TeradataStatistics Wizard makes table skew recommendations based onperm space usage.
Retrieve Statistics for All Tables
and
Retrieve Row Counts for AllTables
Select both of these options to automatically retrieve rowcounts for all tables in the selected database, as TeradataStatistics Wizard makes table growth recommendations basedon row counts.
Enable Tables in All DatabasesMenu Item
Activates the menu item that includes tables within alldatabases.
-
8/12/2019 Teradata Statistics Wizard
36/120
Chapter 2: Getting Started
Workload Toolbar
36 Teradata Statistics Wizard User Guide, Release 14.10
Figure 7: Options Dialog Box with Table Pane Tab
For more information about the options in the Table Panetab, see Retrieving Data on
page 85.
Workload Toolbar
Teradata Statistics Wizard uses icons to visually depict the workload and analysis. The icons in
the toolbar on the left hand side of the Teradata Statistics window provide shortcuts for:
Defining, creating, importing, updating, and cleaning a workload
Creating analysis reports and applying recommendations
Launching Teradata Index Wizard
Table 16: Workload Toolbar options
Icon Description
Define workload from DBQL Statements
Define workload using Statements
-
8/12/2019 Teradata Statistics Wizard
37/120
Chapter 2: Getting Started
Workload Toolba
Teradata Statistics Wizard User Guide, Release 14.10 37
Define workload from QDC Statements
Import workload
Create from an existing workload
Update existing workload.
Clean up workload
Create a Statistics Recommendations Report
View analysis reports
Apply or schedule recommendations
Launch Teradata Visual Explain
Launch Teradata Index Wizard
Table 16: Workload Toolbar options (continued)
Icon Description
-
8/12/2019 Teradata Statistics Wizard
38/120
Chapter 2: Getting Started
Launching the Teradata Statistics Wizard
38 Teradata Statistics Wizard User Guide, Release 14.10
Launching the Teradata Statistics Wizard
To s tart Teradata Statistics Wizard
1 Click Start > Programs > Teradata Statistics Wizard.
The Statistics Wizardwindow opens and is available to connect to a database.
2 Go to the next step, Connecting to a Database on page 38.
Connecting to a Database
To use Teradata Statistics Wizard, log on to a Teradata Database.
Selecting a Logon Method
To select a logon method before logging on
1 Go to Tools > Options.
2 Click the Connectivitytab.
3 Click either ODBCor CLIv2.
4 To connect to a database using ODBC, see Connecting Through ODBC on page 38.
or
To connect to a database using CLIv2, see Connecting Through CLIv2 on page 39.
After selecting a logon method, connect to a database using the procedures that follow.
Connecting Through ODBC
Teradata Statistics Wizard can connect to a database by ODBC.
Important: The following ODBC connection procedure assumes you have configured a data
source. If you have not configured a data source, refer to the ODBC Driver for Teradata User
GuideB035-2509.
To connect to a database using ODBC
1 Click File > Connect.
The Please Select a Data Sourcedialog box appears.
2 Select a database from the list.
3 Click OK.
The Teradata Database Connectdialog box appears.
-
8/12/2019 Teradata Statistics Wizard
39/120
Chapter 2: Getting Started
Connecting to a Database
Teradata Statistics Wizard User Guide, Release 14.10 39
4 Enter the required information and click OKto logged on to the selected database. Refer to
the ODBC Driver for Teradata User GuideB035-2509 .
Connecting Through CLIv2
Teradata Statistics Wizard can connect to a database by CLIv2.
To connect to a database using CLIv2
1 Click File > Connect.
The Connect to Teradata Databasedialog box opens.
2 Use the following table to fill in the dialog box.
3 [Optional] Click Moreor Lessto show or hide the followingAdvanced Opt ions .
Option Description
Database Name Specify a valid Teradata Database server name. For using the host name,the IP Address of the server is stored in the Hostsfile, if notautomatically available by DNS. The database name can also be selectedfrom the Database list. This option can be accessed by pressing Al t +R.
User Name Select the user name from the drop down list, or type in a valid username. The user name is defined for the server. This option can beaccessed by pressing Al t +U.
Password Enter the password for the user name defined in the User Name field.This option can be accessed by pressing Al t +P.
Session Character Set Select the session character set from the drop down list. The sessioncharacter sets supported by the selected database are listed in the drop
down list.
Option Description
Authent icationMechanism
Select from the list of mechanisms that automatically appear. EachTeradata site implements their own security measures. If a list ofmechanisms does not appear and you cannot log on to the TeradataDatabase, consult your DBA or the person responsible for the securityof the Teradata Database.
Authent icationParameter
Type the parameters required by the selected mechanism. Asterisksappear as type to conceal the authentication parameter.
If you do not know what to enter, consult your DBA.
Default Database [Optional] Specify the default database for the session.
Accoun t String [Optional] Specify the log on account string. This option can beaccessed by pressing Al t +A.
-
8/12/2019 Teradata Statistics Wizard
40/120
Chapter 2: Getting Started
Retrieving Statistics
40 Teradata Statistics Wizard User Guide, Release 14.10
4 Click OKto accept the entries and close the Connect to Teradata Databasedialog box.
Note: If the logon information is not correctly entered into the dialog box, an error
message displays. Enter the correct information, and click OK.
Retrieving Statistics
After connecting to a Teradata Database System, a list of databases appears in the Teradata
Statistic Wizard window. See the following figure for an example.
Figure 8: Database Window
To retrieve statistics
1 Double-click a database.
The window splits and displays a list of tables within the database.
2 Double-click a table to retrieve statistics.
The window splits again and displays index information and other values. See UserInterface on page 22.
-
8/12/2019 Teradata Statistics Wizard
41/120
Chapter 2: Getting Started
Searching for a Database, Table, or Column
Teradata Statistics Wizard User Guide, Release 14.10 41
Searching for a Database, Table, or Column
To search for a database, table, or column
1 Right-click on the desired pane (database, table, or column) and select the Find option.
The Find dialog box opens.
2 Enter the name of the database, table, or column that you would like to find, and then click
Find Next.
3 Click Find Nextagain to continue searching.
This concludes the basics. For more in depth information about Teradata Statistics Wizard,
see Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations.
Set Up a Query Capture DatabaseYou can create a QCD using Teradata Statistics Wizard so that you can create and analyze
workloads.
To set up a new QCD
1 Click Tools > Setup QCD.
The Setup QCDdialog box appears.
Figure 9: Setup QCD
-
8/12/2019 Teradata Statistics Wizard
42/120
Chapter 2: Getting Started
View Low Level Error Log
42 Teradata Statistics Wizard User Guide, Release 14.10
2 Click Create all QCF Database objects.
3 In the QCD Namefield, enter a name for the new QCD.
4 In the Ownerfield, enter an owner name. The owner name defaults to the name of the
current user.
5 In the Perm Spacefield, enter a value for the permanent space you want to reserve for theQCD and then select a unit of measurement (KB , MB, GB). The default value is 2 MB.
6 In the Spool Spacefield, enter a value for the spool space you want to reserve for the QCD
and then select a unit of measurement (KB , MB, GB). The default value is 0 MB.
7 [Optional] Select Fallbackto use fallback protection.
8 [Optional] Click Clearto clear all fields and to restore the default values.
9 [Optional] Click Commandto open the Execute SQLwindow.
10 Click Createto set up the QCD.
To modify the permanent space of a QCD
1 Click Tools > Setup QCD.
The Setup QCDdialog box appears.
2 Click Create all QCF Database objects.
3 In the QCD Namefield, enter the name of the QCD you want to modify.
4 In the Perm Space field, enter a new value for the permanent space you want to reserve for
the QCD and then select a unit of measurement (KB , MB, GB)
5 Click Modify Perm.
View Low Level Error Log
Teradata Statistics Wizard logs low level information useful for GSC in the TSWIZ.logfile
located in following directory.
Drive:\Documents and Settings\user\My Documents\Teradata\DBM Logs\
-
8/12/2019 Teradata Statistics Wizard
43/120
Teradata Statistics Wizard User Guide, Release 14.10 43
CHAPTER 3
Defining Workloads, Creating andApplying Statistics Recommendations
The starting point for a statistics design is the ability to capture representative samples of the
collected statistics. In other words, representative samples of active SQL statements. From
there, a workload is defined as an SQL statement or a set of SQL statements. Typically, a
workload is comprised of SQL statements that were executed on a production system. There
are several ways to define a workload and the following topics describe those ways:
Defining a Workload
Defining a Workload From DBQL Statements
Defining a Workload Using Statement Text
Defining a Workload From QCD Statements
Importing a Workload
Defining From an Existing Workload
The following topics may be helpful:
Updating an Existing Workload
Cleaning up Workloads
The action of defining the workload also performs statistics analysis. Once the workload isdefined and analyzed, the next step is obtaining the statistics recommendations. The following
topic discusses the process of producing the Statistics Recommendations Report.
Creating the Statistics Recommendations
The final step in the process is to apply the recommendations to the workload. The following
topic describes this process.
Applying the Recommendations
Defining a Workload
Teradata Statistics Wizard analyzes a workload and makes recommendations, based on the
defined workload. This section discusses defining a workload, based on the different types of
statements being used.
Teradata Statistics Wizard provides the following ways to define a workload:
Select queries from the Teradata Database Query Log (DBQL).
-
8/12/2019 Teradata Statistics Wizard
44/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Defining a Workload
44 Teradata Statistics Wizard User Guide, Release 14.10
Open a file and directly enter SQL statements into a workload, or select the SQL
statements from one or more files.
Select an existing set of execution plans in a user-defined Query Capture Database (QCD)
to form a workload.
Import SQL statements to the test system as a workload from a production system, usingthe Teradata System Emulation Tool. The production system environment is imported
along with the SQL statements.
Enter the SQL statement manually to add or delete statements, and then optionally save
the modified workload under a different name, if needed.
A QCD is a database of relational tables that store the steps of any query plan captured by the
Query Capture Facility (QCF). For more information on QCDs, refer to the Teradata Visual
Explain User GuideB035-2504
To define a workload
1 Click Workload > Createand choose a statement definition method to create a workload
definition method. Statement definitions are listed in the following table.
2 After the workload is created and stored in the QCD, the Workload Definition Summary
dialog box appears, showing the workload. Select OKto complete the workload definition.
Definition Description
From DBQL Statements The Database Query Log (DBQL) provides the capability to store, insystem tables, the performance-related data for a request.
See Defining a Workload From DBQL Statements on page 45.
Using Statement Text SQL statements can be directly keyed into a workload and analyzed.The SQL statements can also be selected from one or more files.
See Defining a Workload Using Statement Text on page 49.
From QCD Statements An existing set of execution plans in a QCD can be selected to definea workload. The workload is created in the QCD in which theexecution plans exist.
See Defining a Workload From QCD Statements on page 52.
Import Workload Users can import workloads from other sources including otherTeradata client tools.
See Importing a Workload on page 54.
From ExistingWorkload
An existing workload can be stored and modified at a later time.Users can either add statements to the workload or remove them
from the workload. An option to save the modified workload using adifferent workload name is also provided.
See Defining From an Existing Workload on page 58.
-
8/12/2019 Teradata Statistics Wizard
45/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Defining a Workload From DBQL Statements
Teradata Statistics Wizard User Guide, Release 14.10 45
After a workload is created and defined, it stays in the workload cache and is opened by default
in the Statistics Analysis Reports and Validations steps.
Defining a Workload From DBQL Statements
To define a workload from DBQL statements
1 Click Workload > Create > From DBQL Statements.
The Define Workload from DBQL Statementsdialog box appears.
Figure 10: Define Workload from DBQL Statements Screen
2 In the QCD Namebox, enter the QCD for the workload or click the QCD Name arrow for a
list of available QCDs.3 If a workload has already been created, the workload name will appear in the Workload
Namebox. If no workload name appears, enter the workload name or click the Workload
Name arrow for a list of available workloads.
4 Under Select Table/View, click Viewsto retrieve the statements from views in the database.
or click Tables to retrieve the statements from tables in the database.
-
8/12/2019 Teradata Statistics Wizard
46/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Defining a Workload From DBQL Statements
46 Teradata Statistics Wizard User Guide, Release 14.10
5 Under Select DBQL option, click DBQL(selected by default) to create the workload by
browsing queries from DBQL or click External Databaseto create the workload by
browsing workload queries from an external database.
6 Click Next. The Select Criteria dialog box appears.
If the QCD name you entered does not exist, a message appears first asking if you want tocreate a QCD. Click Yesto create the new QCD.
Figure 11: Select Criteria Screen
7 Fill in the options under Select Criteria as described in the following table.
Group/Option Option Description
Select Date Start Date Enter a start date in the format YYYY-MM-DD to use insearching for queries on or after the date.
If no start date is specified all statements from the DBQL areloaded.
End Date Enter an end date in the format YYYY-MM-DD to use insearching for queries on or before the date.
If a start date is specified but no end date is specified, allstatements from the DBQL beginning at the start date are loaded.
-
8/12/2019 Teradata Statistics Wizard
47/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Defining a Workload From DBQL Statements
Teradata Statistics Wizard User Guide, Release 14.10 47
Select Time Start Time Enter a start time in the format HH-MM-SS to use in searchingfor queries on or after the start time.
If no start time is specified, the default start time of 00:00:00 is
used.
End Time Enter an end time in the format HH-MM-SS to use in searchingfor queries on or before the end time.
If no start time is specified, the default end time of 13:59:59 isused.
Step Count Specifies the minimum number of steps for the queries retrievedfrom the DBQL
Result Rows Specifies the minimum number of rows returned for the queriesretrieved from the DBQL
Note: This option is not available if connected to a V2R5 system.
Select Users andAccoun ts
Click to create the workload from queries submitted by a set ofusers or accounts from theSelect Users and Acco unts dialog box
Figure 12: Select Users and Accounts Selection Box
Browse a list of users and accounts, and select a user (one ormore) or account (one or more) to include the search. To make aselection, highlight the name, and clickAdd. The user/accountname is displayed in the right hand side of the dialog box. Do thisfor each user name and account to include. Click OK to saveadditions and changes.
Note: By default, all users and accounts are selected.
Group/Option Option Description
-
8/12/2019 Teradata Statistics Wizard
48/120
-
8/12/2019 Teradata Statistics Wizard
49/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Defining a Workload Using Statement Tex
Teradata Statistics Wizard User Guide, Release 14.10 49
Figure 14: Statement Text Screen
10 Click Backto return to the previous dialog box. Click Finishto create the workload with
the selected queries.
11 After the workload is created and stored in the QCD, a Workload Summarydialog box
appears, showing the workload. Click OKto complete the workload definition.
Defining a Workload Using Statement Text
To define a workload using statement text
1 Click Workload > Create > Using Statement Text.
The Define Workload using Statements dialog box appears.
-
8/12/2019 Teradata Statistics Wizard
50/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Defining a Workload Using Statement Text
50 Teradata Statistics Wizard User Guide, Release 14.10
Figure 15: Define Workload using Statements Screen
2 Enter the search criteria and SQL statement information as described in the following
table.
Option Description
SQL Statements In the box, enter the type of SQL statement to be analyzed, or clickBrowseto locate a specific file.
Frequency The number of times this statement is executed in the workload. Thedefault is 1, meaning one time only, but this can be modified to occurmultiple times.
Add Adds the SQL statement text to the workload.
Browse Click Browseto locate the file containing the SQL statement.
Selected Statements
QCD Name Specifies the QCD on which the captured workload is created. Click . ..to search existing QCDs.
If the QCD does not already exist, a message appears asking if youwant to create a QCD. Click Yesto create the QCD.
Workload Name Enter a name for the workload being created.
Note: Do not enter the name of an existing workload.
-
8/12/2019 Teradata Statistics Wizard
51/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Defining a Workload Using Statement Tex
Teradata Statistics Wizard User Guide, Release 14.10 51
3 After the workload is created and stored in the QCD, a summary dialog box opens,
showing the workload. Select OKto complete the workload definition.
Input USING Values
When a query containing the USING clause is submitted in the execute SQL window, the Input
using values screen displays. See Figure 16 on page 52.
Statement Text Enter the text of an SQL statement if it is to be retrieved from the log.
Remove Click to remove the selected statements.
Replace Click to replace a text string in the current document with anotherone.
OK Click to create the workload definition with the selections and closethe dialog box.
Cancel Click to cancel the workload definition and return to the StatisticsWizard window.
Option Description
-
8/12/2019 Teradata Statistics Wizard
52/120
-
8/12/2019 Teradata Statistics Wizard
53/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Defining a Workload From QCD Statements
Teradata Statistics Wizard User Guide, Release 14.10 53
Figure 17: Define Workload from QCD Statements
2 Enter a search criteria and QCD statement information as described in the following table
Field DescriptionQCD Name Enter the name of the QCD database where the query is to be performed.
Query ID Enter a value to locate QCD statements, based on that Query ID tag value.
Query Tag Enter a value to locate QCD statements based on that Query tag value.
Browse QCD Click to locate QCD statements, based on the Query ID and/or Query Tagvalues entered.
Query ID Query ID of the statements.
Frequency The number of times this statement is executed in the workload. Thedefault is 1, meaning one time only, but it can be modified to occur
multiple times.
Statement Text Enter the text of an SQL statement if it is to be retrieved from the log.
Workload Name Enter a name for the workload being created.
Note: Do not enter the name of an existing workload.
Select A ll Click to select all the statements in the list.
Deselect All Click to deselect all the statements in the list.
-
8/12/2019 Teradata Statistics Wizard
54/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Importing a Workload
54 Teradata Statistics Wizard User Guide, Release 14.10
3 After the workload is created and stored in the QCD, a summary dialog box appears,
showing the workload. Click OKto complete the workload definition.
Importing a Workload
SQL statements can be imported from another system to a test machine by following this
procedure.
To import a workload
1 Click Workload > Create > Import Workload.
The Select a File to Import Workload dialog box appears to browse files to find and choose
the workload file to import.
2 Choose the workload file to import.
The Import Workloaddialog box appears with the workload selected.
OK Click to create the workload definition using the selections and close thedialog box to
Cancel Cancel the workload definition and return to the Statistics Wizardwindow.
Field Description
-
8/12/2019 Teradata Statistics Wizard
55/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Importing a Workload
Teradata Statistics Wizard User Guide, Release 14.10 55
Figure 18: Import Options Screen
3 Select the appropriate import options as described in the following table.
Field Description
Import Into
Parent Database Parent directory where import information will reside. Click thedown-arrow to select from a list of directories, or click browse (...) tobring up a list from which to choose a directory.
Target QCD Name Enter the QCD Name from which the workload will be imported, orclick browse (...) to bring up and select from a list of queries.
Ignore all errors Check this box to ignore all processing errors.
Select
QCD Name Enter the QCD Name under which SQL statements will be selected, orclick browse (...) to bring up and select from a list of SQL statements.
Workload Name Enter a name for the workload being created.
Note: Do not enter the name of an existing workload.
-
8/12/2019 Teradata Statistics Wizard
56/120
Chapter 3: Defining Workloads, Creating and Applying Statistics Recommendations
Importing a Workload
56 Teradata Statistics Wizard User Guide, Release 14.10
Query ID Query ID of the statements.
Import Options
Import options affect how the workload is imported.
Object Definitions Captures the data model and data definition language (DLL).
Statistics Captures statistics while importing the workload.
Random AMPSamples
Allows captured data from randomly sampled AMPs.
Demographics Captures data from the imported workload to create datademographics.
Execution Plan Captures the execution plan.
WorkLoad Data Captures workload data.
OCD Data Captures OCD
top related