Oracle Exadata is the equivalent of a F1 car in terms of performance but are you sure your application is driving it at its full potential? A simple "lift&shift" approach to Exadata migration might lose significant opportunities for improvements. This session highlights a few example where making little changes dramatically changed the application performance
This presentation's aim is to get to know the improvements in behaviour of the optimizer in Oracle 11g v2. It focuses on understanding the decision making of the optimiser rather than the use of point and click tools.
Although CQL and SQL have a similar syntax, there are many differences that may confuse users. I will explain what the CQL WHERE clause supports and how Cassandra processes it internally.
While MySQL is a popular and widely used RDBMS, some default features and settings are very foreign in comparison with other commercial RDBMS products. In this discussion, Ronald Bradford will discuss some of the MySQL defaults including a non-transactional state, silent data truncations, date management, and transaction isolation options. These are all critical for data integrity and consistency. He will cover in-depth topics including SQL_MODE that saves the day. He will also cover character sets and collations and the best practices to ensure your UTF8 is stored and retrieved correctly.
Indexing Strategies for Oracle Databases - Beyond the Create Index StatementSean Scott
There's more to indexing than the basic "create index" statement! We'll go under the covers and look at the different types of indexes available in both Enterprise and Standard Editions, including b-tree, bitmap, reverse-key, functional, composite and partitioned; describe how to select the most appropriate type of index for a particular situation; explore storage parameters and lesser-known configuration options available to fine-tune performance; discuss methods for gathering statistics, including whether to capture histograms or not; and cover techniques for managing and maintaining a healthy library of indexes. Scripts included!
1. How to choose the appropriate type of index for a particular implementation.
2. An understanding of indexing options and storage configurations available to improve index (and database) performance.
3. Techniques for managing and maintaining the health of indexes.
Oracle Exadata is the equivalent of a F1 car in terms of performance but are you sure your application is driving it at its full potential? A simple "lift&shift" approach to Exadata migration might lose significant opportunities for improvements. This session highlights a few example where making little changes dramatically changed the application performance
This presentation's aim is to get to know the improvements in behaviour of the optimizer in Oracle 11g v2. It focuses on understanding the decision making of the optimiser rather than the use of point and click tools.
Although CQL and SQL have a similar syntax, there are many differences that may confuse users. I will explain what the CQL WHERE clause supports and how Cassandra processes it internally.
While MySQL is a popular and widely used RDBMS, some default features and settings are very foreign in comparison with other commercial RDBMS products. In this discussion, Ronald Bradford will discuss some of the MySQL defaults including a non-transactional state, silent data truncations, date management, and transaction isolation options. These are all critical for data integrity and consistency. He will cover in-depth topics including SQL_MODE that saves the day. He will also cover character sets and collations and the best practices to ensure your UTF8 is stored and retrieved correctly.
Indexing Strategies for Oracle Databases - Beyond the Create Index StatementSean Scott
There's more to indexing than the basic "create index" statement! We'll go under the covers and look at the different types of indexes available in both Enterprise and Standard Editions, including b-tree, bitmap, reverse-key, functional, composite and partitioned; describe how to select the most appropriate type of index for a particular situation; explore storage parameters and lesser-known configuration options available to fine-tune performance; discuss methods for gathering statistics, including whether to capture histograms or not; and cover techniques for managing and maintaining a healthy library of indexes. Scripts included!
1. How to choose the appropriate type of index for a particular implementation.
2. An understanding of indexing options and storage configurations available to improve index (and database) performance.
3. Techniques for managing and maintaining the health of indexes.
Managing data with an RDBMS is probably one of the key IT resources for roughly 40 years. Splitting up logical data structures into physical ones also known as partitioning is a key ingredient. The attached presentation demonstrates examples based on the recently released Oracle 12.2 database.
Update as of May 31st 2017: You might ask yourself: is this any practical? Yes it is. We are currently creating a bit of code to complement the example.
Managing Statistics for Optimal Query PerformanceKaren Morton
Half the battle of writing good SQL is in understanding how the Oracle query optimizer analyzes your code and applies statistics in order to derive the “best” execution plan. The other half of the battle is successfully applying that knowledge to the databases that you manage. The optimizer uses statistics as input to develop query execution plans, and so these statistics are the foundation of good plans. If the statistics supplied aren’t representative of your actual data, you can expect bad plans. However, if the statistics are representative of your data, then the optimizer will probably choose an optimal plan.
This paper describes the evolution of the Plan table and DBMSX_PLAN in 11g and some of the features that can be used to troubelshoot SQL performance effectively and efficiently.
On version 12c Oracle introduced new features to allow Adaptive optimizations: Adaptive Plans and Adaptive Statistics. After a quick presentation of concepts, this session will explore the interaction of these features with other performance management techniques using examples, like SPM and SQL profiles. Attendees will get an updated picture of tools available to troubleshoot performance issues, and how to get the most of these new features.
Обзорный рассказ про новые возможности в мире PostgreSQL для митапа Big Data Minsk User Group 29 апреля 2016 г.: https://www.facebook.com/events/120784531655479/
Partitioning Tables and Indexing Them --- ArticleHemant K Chitale
This is the Article (White Paper) that accompanied my Presentation "Partitioning Tables and Indexing Them" (which, too, is on slideshare) for AIOUG Sangam 11
Oracle database performance diagnostics - before your beginHemant K Chitale
This is an article that I had written in 2011 for publication on OTN. It never did appear. So I am making it available here. It is not "slides" but is only 7 pages long. I hope you find it useful.
Launch Your Streaming Platforms in MinutesRoshan Dwivedi
The claim of launching a streaming platform in minutes might be a bit of an exaggeration, but there are services that can significantly streamline the process. Here's a breakdown:
Pros of Speedy Streaming Platform Launch Services:
No coding required: These services often use drag-and-drop interfaces or pre-built templates, eliminating the need for programming knowledge.
Faster setup: Compared to building from scratch, these platforms can get you up and running much quicker.
All-in-one solutions: Many services offer features like content management systems (CMS), video players, and monetization tools, reducing the need for multiple integrations.
Things to Consider:
Limited customization: These platforms may offer less flexibility in design and functionality compared to custom-built solutions.
Scalability: As your audience grows, you might need to upgrade to a more robust platform or encounter limitations with the "quick launch" option.
Features: Carefully evaluate which features are included and if they meet your specific needs (e.g., live streaming, subscription options).
Examples of Services for Launching Streaming Platforms:
Muvi [muvi com]
Uscreen [usencreen tv]
Alternatives to Consider:
Existing Streaming platforms: Platforms like YouTube or Twitch might be suitable for basic streaming needs, though monetization options might be limited.
Custom Development: While more time-consuming, custom development offers the most control and flexibility for your platform.
Overall, launching a streaming platform in minutes might not be entirely realistic, but these services can significantly speed up the process compared to building from scratch. Carefully consider your needs and budget when choosing the best option for you.
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
2. Hemant K Chitale
• whoami ?
• Oracle 5 to Oracle 10gR2 : DOS, Xenix,8
flavours of Unix, Linux, Windows
• Financial Services, Govt/Not-for-Profit, ERP,
Custom
• Production Support, Consulting, Development
• A DBA, not a Developer
• My Oracle Blog http://hemantoracledba.blogspot.com
3. Explain Plans -- simple
• Explain Plan is a method of displaying the
*expected* OR *actual* SQL Execution Plan
• Since 9i, Oracle has provided the
DBMS_XPLAN package with various procedures
4. Method 1 : Without Executing the Query
• NOT to be used if the query has Binds –
particularly because “Explain is blind to Binds”
• Use “EXPLAIN PLAN FOR …. Query ….”
followed by “DBMS_XPLAN.DISPLAY”.
5. Given this query :
select sale_id, cust_id, remarks
from sales where
sale_date between to_date('01-NOV-10','DD-MON-RR')
and to_date('04-NOV-10','DD-MON-RR')
6. SQL> explain plan for
2 select sale_id, cust_id, remarks
3 from sales where
4 sale_date between to_date('01-NOV-10','DD-MON-RR')
5 and to_date('04-NOV-10','DD-MON-RR')
6 /
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------
-----------------------------------------------
Plan hash value: 1231079358
----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3000 | 166K| 244 (2)| 00:00:03 |
|* 1 | FILTER | | | | | |
|* 2 | TABLE ACCESS FULL| SALES | 3000 | 166K| 244 (2)| 00:00:03 |
----------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter(TO_DATE('01-NOV-10','DD-MON-RR')<=TO_DATE('04-NOV-10','DD-
MON-RR'))
2 - filter("SALE_DATE"<=TO_DATE('04-NOV-10','DD-MON-RR') AND
"SALE_DATE">=TO_DATE('01-NOV-10','DD-MON-RR'))
17 rows selected.
7. Understand the components :
Plan hash value: 1231079358
----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3000 | 166K| 244 (2)| 00:00:03 |
|* 1 | FILTER | | | | | |
|* 2 | TABLE ACCESS FULL| SALES | 3000 | 166K| 244 (2)| 00:00:03 |
----------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter(TO_DATE('01-NOV-10','DD-MON-RR')<=TO_DATE('04-NOV-10','DD-
MON-RR'))
2 - filter("SALE_DATE"<=TO_DATE('04-NOV-10','DD-MON-RR') AND
"SALE_DATE">=TO_DATE('01-NOV-10','DD-MON-RR'))
Every Execution Plan has a Hash Value. (Just as every SQL has a Hash Value and
SQL_ID). We‟ll see later where the Hash Value is an important clue.
Step 2 is indented --- we normally think that it is executed before Step 1.
A Filter for SALE_DATE between two dates is applied when doing a FullTableScan
(“TABLE ACCESS FULL” and “filter”) at Step 2. Oracle expects to return 3000 rows
after applying the “filter” to the FullTableScan. (The Explain Plan shows the number of
rows expected to be returned by the step, not the number of rows that the FTS will read
{which is actually 100,000 !}). These 3000 rows will be 166KBytes to be returnd to the
client (SQLPlus session).
Step 1 is a filter that Oracle applies for validation.
8. What is the filter in Step 1 ? Why does Oracle “apply it for validation” ?
SQL> l
1 explain plan for
2 select sale_id, cust_id, remarks
3 from sales where
4 sale_date between to_date('01-NOV-10','DD-MON-RR')
5* and to_date('25-OCT-10','DD-MON-RR')
SQL> /
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------
------------------------------------------------
Plan hash value: 1231079358
----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 57 | 244 (2)| 00:00:03 |
|* 1 | FILTER | | | | | |
|* 2 | TABLE ACCESS FULL| SALES | 1 | 57 | 244 (2)| 00:00:03 |
----------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter(TO_DATE('01-NOV-10','DD-MON-RR')<=TO_DATE('25-OCT-10','DD-
MON-RR'))
2 - filter("SALE_DATE"<=TO_DATE('25-OCT-10','DD-MON-RR') AND
"SALE_DATE">=TO_DATE('01-NOV-10','DD-MON-RR'))
SQL>
9. SQL> set autotrace on
SQL> select sale_id, cust_id, remarks
2 from sales where
3 sale_date between to_date('01-NOV-10','DD-MON-RR')
4 and to_date('25-OCT-10','DD-MON-RR')
5 /
no rows selected
Execution Plan
----------------------------------------------------------
Plan hash value: 1231079358
----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 57 | 244 (2)| 00:00:03 |
|* 1 | FILTER | | | | | |
|* 2 | TABLE ACCESS FULL| SALES | 1 | 57 | 244 (2)| 00:00:03 |
----------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter(TO_DATE('01-NOV-10','DD-MON-RR')<=TO_DATE('25-OCT-10','DD-
MON-RR'))
2 - filter("SALE_DATE"<=TO_DATE('25-OCT-10','DD-MON-RR') AND
"SALE_DATE">=TO_DATE('01-NOV-10','DD-MON-RR'))
Statistics
----------------------------------------------------------
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
409 bytes sent via SQL*Net to client
408 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
SQL>
10. You can now see that the FILTER in step 1 was a method for validation.
Since
filter(TO_DATE('01-NOV-10','DD-MON-RR')<=TO_DATE('25-OCT-10','DD-MON-
RR'))
will be *FALSE* (because ‟01-NOV-10‟ is *not less than* „25-OCT-10‟),
the next step (Step 2) does not get executed at all.
That is why the AUTOTRACE shows 0 block gets
Statistics
----------------------------------------------------------
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
inspite of Step 2 supposedly being “TABLE ACCESS FULL” !
Therefore, when you see a FILTER as a step in an Execution Plan,
remember that it may be a “logic filter”. Oracle may be using it to decide
if the “indented” step below it needs to be executed at all.
If this FILTER returns FALSE, the “indented” “child” step is NOT
executed.
11. Method 2 : Without Query Execution
• This is useful to “validate” an Execution Plan
• This is an alternative to executing with SQL
Tracing enabled and writing to a trace file
• This method uses the Hint
“GATHER_PLAN_STATISTICS”. (Another
option is to set the session parameter
STATISTICS_LEVEL to “ALL” just before
execution of the SQL).
12. Actually executing the query, with the Hint added :
SQL> select /*+ gather_plan_statistics */ sale_id, cust_id, remarks
2 from sales where
3 sale_date between to_date('01-NOV-10','DD-MON-RR')
4 and to_date('04-NOV-10','DD-MON-RR')
5 /
SALE_ID CUST_ID REMARKS
---------- ---------- -----------------------------------------------
---
24099 40 BIK9SBLPJKGKA8UINWX20O64KAD210CMW4Z7AZUL
24100 44 TXE1BTQM1631FJVTYCUBYBGOFRL7O32QVG20ZV6C
…………….
…………….
27097 77 11KBENL0XE4T2OXAWXF9DAW2HHSQBG696BHJ5F79
27098 17 MHEK21ILW79EHUIJC1Q3RA4PLC844K2KXNXCYL3E
3000 rows selected.
Elapsed: 00:00:04.20
SQL>
13. SQL> select * from table(dbms_xplan.display_cursor('','','ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------------------
-----------------------------------
SQL_ID 2xk5b0ypks53n, child number 0
-------------------------------------
select /*+ gather_plan_statistics */ sale_id, cust_id, remarks from
sales where sale_date between to_date('01-NOV-10','DD-MON-RR')
and to_date('04-NOV-10','DD-MON-RR')
Plan hash value: 1231079358
-----------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads |
-----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | 3000 |00:00:00.24 | 1064 | 835 |
|* 1 | FILTER | | 1 | | 3000 |00:00:00.24 | 1064 | 835 |
|* 2 | TABLE ACCESS FULL| SALES | 1 | 3000 | 3000 |00:00:00.15 | 1064 | 835 |
-----------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter(TO_DATE('01-NOV-10','DD-MON-RR')<=TO_DATE('04-NOV-10','DD-MON-RR'))
2 - filter(("SALE_DATE"<=TO_DATE('04-NOV-10','DD-MON-RR') AND
"SALE_DATE">=TO_DATE('01-NOV-10','DD-MON-RR')))
I use the DISPLAY_CURSOR procedure.
The first two Parameters are SQL_ID and CHILD_NO. The „‟ (NULL)
values passed tell Oracle to evaluate for the SQL just (previously)
executed in my *current* session.
The last parameter is for display format. „ALLSTATS LAST‟ is to show all
statistics for the Last execution of the same SQL.
14. -----------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads |
-----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | 3000 |00:00:00.24 | 1064 | 835 |
|* 1 | FILTER | | 1 | | 3000 |00:00:00.24 | 1064 | 835 |
|* 2 | TABLE ACCESS FULL| SALES | 1 | 3000 | 3000 |00:00:00.15 | 1064 | 835 |
-----------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter(TO_DATE('01-NOV-10','DD-MON-RR')<=TO_DATE('04-NOV-10','DD-MON-RR'))
2 - filter(("SALE_DATE"<=TO_DATE('04-NOV-10','DD-MON-RR') AND
"SALE_DATE">=TO_DATE('01-NOV-10','DD-MON-RR')))
Here Oracle shows the Expected-Rows from each Step versus the Actual-Rows.
(We already know the Step 1 for this plan is a “validation” step so we ignore it).
Step 2 was expected to return 3000 rows and did return 3000 rows (after applying
the filters on all the 100,000 rows returned by the FullTableScan).
The Actual-Time and Buffer Gets and Physical Reads (number of Oracle Blocks,
not number of Read Calls to the OS) are also displayed.
In a complex Execution Plan, the A-Rows, A-Time and Buffers (and, possibly,
Reads) columns are the ones to pay attention to – they will indicate whether the
expected cardinality for the particular step was correct (if A-Rows is different from
E-Rows) and how long the step took.
NOTE : When you have a query that is a join of two tables using a Nested Loop,
you might mis-read the E-Rows and A-Rows. You will have to pay attention to
another column “Starts”.
15. Method 3 : From AWR Historical Information
• This is useful to monitor a query‟s execution
profile over time
• It can be done only if the SQL has been
captured by AWR
• Remember : AWR only captures the Top „N‟
SQLs present in the Shared Pool when a
Snapshot is created. If the SQL had been
invalidated or aged out or was not in the Top „N‟,
at the time of the Snapshot, it wouldn‟t have bee
captured by AWR !
16. NOTE : This output spans this slide *and* the next two slides :
SQL> select * from table(dbms_xplan.display_awr('3pat1z2qx4gyg')) ;
PLAN_TABLE_OUTPUT
----------------------------------------------------------
----------------------------------------------------------
----------------
17. SQL_ID 3pat1z2qx4gyg
--------------------
select sale_id, cust_id, remarks from sales where sale_date between
to_date('01-NOV-10','DD-MON-RR') and
to_date('04-NOV-10','DD-MON-RR')
Plan hash value: 909439854
------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 35 (100)| |
| 1 | FILTER | | | | | |
| 2 | TABLE ACCESS BY INDEX ROWID| SALES | 3000 | 166K| 35 (0)| 00:00:01 |
| 3 | INDEX RANGE SCAN | SALES_DATES_NDX | 3000 | | 9 (0)| 00:00:01 |
------------------------------------------------------------------------------------------------
18. SQL_ID 3pat1z2qx4gyg
--------------------
select sale_id, cust_id, remarks from sales where sale_date between
to_date('01-NOV-10','DD-MON-RR') and
to_date('04-NOV-10','DD-MON-RR')
Plan hash value: 1231079358
----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 244 (100)| |
| 1 | FILTER | | | | | |
| 2 | TABLE ACCESS FULL| SALES | 3000 | 166K| 244 (2)| 00:00:03 |
----------------------------------------------------------------------------
19. We see two different Execution Plans with two different Plan Hash Values.
Why is that so ?
Apparently, the Execution Plan earlier had used an Index Range Scan,
using Index “SALES_DATES_NDX”.
Later the Execution Plan for the same SQL (because the SQL_ID is the
same) has changed to a Full Table Scan.
What had happened was that I had dropped the Index
“SALES_DATES_NDX” between the first execution and the second one !
So, this display from AWR shows that the Execution Plans can and have
changed over time, with the Plan Hash Value changing accordingly !
20. Another way is to run $ORACLE_HOME/rdbms/admin/awrsqrpt.sql :
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 1152
Begin Snapshot Id specified: 1152
Enter value for end_snap: 1156
End Snapshot Id specified: 1156
Specify the SQL Id
~~~~~~~~~~~~~~~~~~
Enter value for sql_id: 3pat1z2qx4gyg
SQL ID specified: 3pat1z2qx4gyg
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrsqlrpt_1_1152_1156.txt. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name:
Using the report name awrsqlrpt_1_1152_1156.txt
21. WORKLOAD REPOSITORY SQL Report
Snapshot Period Summary
DB Name DB Id Instance Inst Num Startup Time Release RAC
------------ ----------- ------------ -------- --------------- ----------- ---
ORCL 1229390655 orcl 1 21-Apr-11 22:33 11.2.0.1.0 NO
Snap Id Snap Time Sessions Curs/Sess
--------- ------------------- -------- ---------
Begin Snap: 1152 21-Apr-11 22:40:02 29 1.4
End Snap: 1156 22-Apr-11 00:00:19 31 1.5
Elapsed: 80.29 (mins)
DB Time: 1.76 (mins)
SQL Summary DB/Inst: ORCL/orcl Snaps: 1152-1156
Elapsed
SQL Id Time (ms)
------------- ----------
3pat1z2qx4gyg 518
Module: sqlplus@localhost.localdomain (TNS V1-V3)
select sale_id, cust_id, remarks from sales where sale_date between to_date('01-
NOV-10','DD-MON-RR') and to_date('04-NOV-10','DD-MON-RR')
-------------------------------------------------------------
22. SQL ID: 3pat1z2qx4gyg DB/Inst: ORCL/orcl Snaps: 1152-1156
-> 1st Capture and Last Capture Snap IDs
refer to Snapshot IDs witin the snapshot range
-> select sale_id, cust_id, remarks from sales where sale_date between to...
Plan Hash Total Elapsed 1st Capture Last Capture
# Value Time(ms) Executions Snap ID Snap ID
--- ---------------- ---------------- ------------- ------------- --------------
1 1231079358 400 1 1155 1155
2 909439854 118 1 1153 1153
-------------------------------------------------------------
This shows that there have been two executions, one of 400ms and the other of 118ms, with
two different Plan Hash Values and captured in different Snaphots.
Plan 2 is the “older” plan and took less time. This was the Plan with the Index Range Scan.
23. Plan 1(PHV: 1231079358)
-----------------------
Plan Statistics DB/Inst: ORCL/orcl Snaps: 1152-1156
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
Stat Name Statement Per Execution % Snap
---------------------------------------- ---------- -------------- -------
Elapsed Time (ms) 400 399.5 0.4
CPU Time (ms) 248 248.0 0.3
Executions 1 N/A N/A
Buffer Gets 1,281 1,281.0 0.2
Disk Reads 883 883.0 4.1
Parse Calls 1 1.0 0.0
Rows 3,000 3,000.0 N/A
User I/O Wait Time (ms) 42 N/A N/A
Cluster Wait Time (ms) 0 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 0 N/A N/A
Invalidations 0 N/A N/A
Version Count 1 N/A N/A
Sharable Mem(KB) 14 N/A N/A
-------------------------------------------------------------
Execution Plan
----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 244 (100)| |
| 1 | FILTER | | | | | |
| 2 | TABLE ACCESS FULL| SALES | 3000 | 166K| 244 (2)| 00:00:03 |
----------------------------------------------------------------------------
24. Plan 2(PHV: 909439854)
----------------------
Plan Statistics DB/Inst: ORCL/orcl Snaps: 1152-1156
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
Stat Name Statement Per Execution % Snap
---------------------------------------- ---------- -------------- -------
Elapsed Time (ms) 118 118.0 0.1
CPU Time (ms) 45 45.0 0.1
Executions 1 N/A N/A
Buffer Gets 666 666.0 0.1
Disk Reads 59 59.0 0.3
Parse Calls 1 1.0 0.0
Rows 3,000 3,000.0 N/A
User I/O Wait Time (ms) 84 N/A N/A
Cluster Wait Time (ms) 0 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 0 N/A N/A
Invalidations 0 N/A N/A
Version Count 1 N/A N/A
Sharable Mem(KB) 14 N/A N/A
-------------------------------------------------------------
Execution Plan
------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 35 (100)| |
| 1 | FILTER | | | | | |
| 2 | TABLE ACCESS BY INDEX ROWID| SALES | 3000 | 166K| 35 (0)| 00:00:01 |
| 3 | INDEX RANGE SCAN | SALES_DATES_NDX | 3000 | | 9 (0)| 00:00:01 |
------------------------------------------------------------------------------------------------
25. Full SQL Text
SQL ID SQL Text
------------ -----------------------------------------------------------------
3pat1z2qx4gy select sale_id, cust_id, remarks from sales where sale_date betwe
een to_date('01-NOV-10', 'DD-MON-RR') and to_date('04-NOV-10', 'D
D-MON-RR')
Report written to awrsqlrpt_1_1152_1156.txt
SQL>