没有合适的资源?快使用搜索试试~ 我知道了~
首页高清彩版 oracle sql performance tuning and optimization
高清彩版 oracle sql performance tuning and optimization
需积分: 10 81 浏览量
更新于2023-05-25
评论
收藏 4.18MB PDF 举报
高清彩版 Oracle SQL Performance Tuning and Optimization: It's all about the Cardinalities
资源详情
资源评论
资源推荐

It’s all about the Cardinalities
ORACLE SQL
PERFORMANCE TUNING
AND OPTIMIZATION
By Kevin Meade

It’s all about the Cardinalities
Oracle SQL Performance Tuning and Optimization
Copyright 2014 by Kevin Meade
km133688@sbcglobal.net
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage and retrieval
system, without the prior written permission of the copyright owner.
However, subject to all other legal limitations in their respective locales and limited to any rights others may
have like trademark holders etc. that might be referenced in this book, as author and copyright holder to my
material:
I give permission to publishers and distributors to provide viewing access to this book in order to allow
prospective buyers opportunity to evaluate the book before purchase. One example of this is Amazon’s
“Look Inside” feature.
I give permission to anyone to distribute all the helper scripts as shown in the KNOW YOUR SCRIPTS
section, to others without restriction. Those distributing these scripts agree to release me from any liability
as I offer no warranty express or implied to these scripts. This book is after all, about sharing and improving
the work-a-day world of Oracle.
I give permission to anyone who owns a legal copy of this book in whatever form to reproduce pieces of it
for educational purposes. This would include but not be limited to: sharing information with friends, writing
your own book or web article, or creating a class using these materials. Just be reasonable, don’t go
making copies of entire chapters, and remember to mention the book please.

It’s all about the Cardinalities
1
Contents
About the Author ................... 19
How this Book is Different ..... 21
Those who came before ........ 23
Getting the FREE STUFF ..... 25
Reviews on Amazon ............. 27
WWW.ORAFAQ.COM .......... 29
John Watson ................................................. 29
Jim Irvine ....................................................... 29
Lalit Kumar .................................................... 29
Mark Kilgour .................................................. 29
Ross Leishman ............................................. 30
Saša Dominković .......................................... 30
Soaring with Eagles .............. 31
Barry Ward .................................................... 31
Dennis Deluzio .............................................. 31

It’s all about the Cardinalities
2
Dheeraj Madadi ............................................. 31
Jack McGuirk ................................................. 31
Nirav Kathrani................................................ 31
Robert Romanowski ...................................... 31
Subrahmanyam Jannalagadda ..................... 32
Chapter 1: DRIVING TABLE
and JOIN ORDER .................. 33
The Four Parts of a Query ............................ 33
The Filtered Rows Percentage Method ........ 34
First Look at a Query ................................................................. 35
Query Diagrams ........................................................................ 36
Driving Table and Join Order ..................................................... 37
COUNT QUERIES and FILTER QUERIES ................................ 38
FRP Spreadsheet ...................................................................... 39
A Filtered Rows Percentage Example .......... 40
1. Format the PROBLEM QUERY ............................................ 41
2. Familiarize yourself with the problem query .......................... 45
Get a Description .................................................................................................................................. 45
Look for Mistakes ................................................................................................................................. 45
Check for the Unusual ......................................................................................................................... 46
3. Create a spreadsheet ........................................................... 47

It’s all about the Cardinalities
3
4. List tables from the query in the spreadsheet ....................... 47
5. Note the row count for each table ......................................... 49
6. Build and run FILTER QUERIES for each table .................... 50
7. Note the filtered row counts .................................................. 52
8. Compute FILTERED ROWS PERCENTAGE for each table . 52
9. Determine PREFERRED JOIN ORDER ............................... 53
10. Construct a QUERY DIAGRAM .......................................... 54
11. Determine INITIAL JOIN ORDER ........................................ 55
12. Build and run RECONSTRUCTION QUERIES ................... 57
ATT_EMP_ORG Reconstruction Query ....................................................................................... 58
CBE_EMP Reconstruction Query ...................................................................................................... 58
V_CBE_LV_RQST Reconstruction Query ........................................................................................ 58
V_PLCY_DIM Reconstruction Query ................................................................................................ 59
V_LV_PLN_USGE_FACT Reconstruction Query ........................................................................... 60
ATT_LV_TYP (LV_SEG_LV_TYP) Reconstruction Query ............................................................. 61
ATT_LV_PLN_TYP Reconstruction Query ....................................................................................... 62
ATT_LV_PLN Reconstruction Query ................................................................................................. 63
13. Note reconstruction row counts .......................................... 65
14. Use CARDINALITY FEEDBACK to adjust join order .......... 65
15. Repeat (11) thru (12) once if join order changed ................ 65
16. Determine if further action is necessary .............................. 66
Summary #1 .................................................. 69
How to use FILTERED ROWS PERCENTAGE
Method .......................................................... 69
Backtracking on CARDINALITY FEEDBACK 70
14. Use CARDINALITY FEEDBACK to adjust join order .......... 70
15. Repeat (11) through (12) once if join order changed ........... 71
The Short Cut (Brain over Brawn) ................ 73
剩余566页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0