SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) &...
-
Upload
jesse-lawrence -
Category
Documents
-
view
219 -
download
1
Transcript of SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) &...
![Page 1: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/1.jpg)
SOM Sponsors:
ORACLE STATISTICS GATHERING STRATEGY
& VERSION CONTROL
By:
Yury Velikanov (Pythian)
& All of you
![Page 2: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/2.jpg)
SOM Sponsors:
Problem statement
•The most dangerous issue is … Dramatically changed performance
•What change performance? Application’s changes Statistics changes Data changes
•Version control Application Statistics Data
![Page 3: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/3.jpg)
SOM Sponsors:
Oracle Statistics gathering strategy
• How often do we need to gather statistics (if we need to gather it at all)
• What percentage should be used to gather statistics
• Should we lock statistics for any type of objects (staging tables, temporary tables etc)
• Partitioning and copying statistics from one partition to others
• Statistics gathering time windows and related techniques
• Automatic statistics gathering (pros/cons)
• Statistics gathering features in new Oracle RDBMS versions (11GR2)
• Statistics gathering and version control
• Do we still need to use analyse command as alternative to dbms_stats?
• Stats and DEV/TEST/UAT environment. How to manage those?
• Statistics gathering performance
![Page 4: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/4.jpg)
SOM Sponsors:
How often ?
•Never
•Each 24 hours
•Each SQL run
•Weekly/Monthly/Yearly
•AUTO MAGICALLY :)
•Important!
![Page 5: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/5.jpg)
SOM Sponsors:
What % gather statistics ?
•100% all the time
•10% all the time
•AUTO
![Page 6: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/6.jpg)
SOM Sponsors:
Should we lock statistics
•staging tables
•temporary tables
•tables that we don’t want application to gather statistics itself
![Page 7: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/7.jpg)
SOM Sponsors:
Stats and Huge Tables
•Partitioning Could copying statistics from one older to new partition
•Huge table Why we should gather statistics at all :)
![Page 8: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/8.jpg)
SOM Sponsors:
Statistics gathering performance•Parallel option!
•Memory settings!
•Do not gather stats there where we do not need it
![Page 9: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/9.jpg)
SOM Sponsors:
Universal statistics gathering
•Statistics gathering time windows and related techniques
•Automatic statistics gathering (pros/cons)
![Page 10: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/10.jpg)
SOM Sponsors:
Statistics gathering features in new Oracle RDBMS versions (11GR2) •http://www.articles.freemegazone.com/11g-enhanced-optimizer-statistics-maintenance.php
•Setting STALE_PERCENT per Object
•Pending Statistics (gather but not publish)
•Extended Statistics (multi columns)
![Page 11: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/11.jpg)
SOM Sponsors:
Statistics & version control
•This is close to perfect strategy
•It doesn't address the problem for 100% There are always changes in the application There are always changes in the date
![Page 12: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/12.jpg)
SOM Sponsors:
Do we still need to use analyse command as alternative to dbms_stats?
![Page 13: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/13.jpg)
SOM Sponsors:
Stats and DEV/TEST/UAT environment. How to manage those?
![Page 14: SOM Sponsors: ORACLE STATISTICS GATHERING STRATEGY & VERSION CONTROL By: Yury Velikanov (Pythian) & All of you.](https://reader031.fdocuments.us/reader031/viewer/2022020723/55146dcb550346284e8b5ebe/html5/thumbnails/14.jpg)
SOM Sponsors:
Best practices
•Save previous statistics before gathering a new one
•Gather statistics rare as possible
•Manage exceptions Lock statistics
•Test changes in the statistics gathering approuch