SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Oracle Diagnostics
Hemant K Chitale
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
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
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”.
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')
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.
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.
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>
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>
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.
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).
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>
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.
-----------------------------------------------------------------------------------------------
| 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”.
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 !
NOTE : This output spans this slide *and* the next two slides :
SQL> select * from table(dbms_xplan.display_awr('3pat1z2qx4gyg')) ;
PLAN_TABLE_OUTPUT
----------------------------------------------------------
----------------------------------------------------------
----------------
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 |
------------------------------------------------------------------------------------------------
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 |
----------------------------------------------------------------------------
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 !
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
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')
-------------------------------------------------------------
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.
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 |
----------------------------------------------------------------------------
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 |
------------------------------------------------------------------------------------------------
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>

Weitere Àhnliche Inhalte

Was ist angesagt?

Histograms in 12c era
Histograms in 12c eraHistograms in 12c era
Histograms in 12c eraMauro Pagano
 
Electronics for-you-projects-and-ideas-2000
Electronics for-you-projects-and-ideas-2000Electronics for-you-projects-and-ideas-2000
Electronics for-you-projects-and-ideas-2000nonshahid
 
Is your SQL Exadata-aware?
Is your SQL Exadata-aware?Is your SQL Exadata-aware?
Is your SQL Exadata-aware?Mauro Pagano
 
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNRonald Bradford
 
MariaDB: Engine Independent Table Statistics, including histograms
MariaDB: Engine Independent Table Statistics, including histogramsMariaDB: Engine Independent Table Statistics, including histograms
MariaDB: Engine Independent Table Statistics, including histogramsSergey Petrunya
 
MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07Ronald Bradford
 
Date data type and Globalization in Oracle
Date data type and Globalization in OracleDate data type and Globalization in Oracle
Date data type and Globalization in OracleMasoud Haji Hassan Pour
 
New features-in-mariadb-and-mysql-optimizers
New features-in-mariadb-and-mysql-optimizersNew features-in-mariadb-and-mysql-optimizers
New features-in-mariadb-and-mysql-optimizersSergey Petrunya
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatFranck Pachot
 
Introduction to Parallel Processing Algorithms in Shared Nothing Databases
Introduction to Parallel Processing Algorithms in Shared Nothing DatabasesIntroduction to Parallel Processing Algorithms in Shared Nothing Databases
Introduction to Parallel Processing Algorithms in Shared Nothing DatabasesOfir Manor
 
Full Table Scan: friend or foe
Full Table Scan: friend or foeFull Table Scan: friend or foe
Full Table Scan: friend or foeMauro Pagano
 
Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
 Design and Develop SQL DDL statements which demonstrate the use of SQL objec... Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
Design and Develop SQL DDL statements which demonstrate the use of SQL objec...bhavesh lande
 
Things you should know about Oracle truncate
Things you should know about Oracle truncateThings you should know about Oracle truncate
Things you should know about Oracle truncateKazuhiro Takahashi
 
A deep look at the cql where clause
A deep look at the cql where clauseA deep look at the cql where clause
A deep look at the cql where clauseBenjamin Lerer
 
DataStax: A deep look at the CQL WHERE clause
DataStax: A deep look at the CQL WHERE clauseDataStax: A deep look at the CQL WHERE clause
DataStax: A deep look at the CQL WHERE clauseDataStax Academy
 
MySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That BiteMySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That BiteRonald Bradford
 
Optimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCOptimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCLouis liu
 
Indexing Strategies for Oracle Databases - Beyond the Create Index Statement
Indexing Strategies for Oracle Databases - Beyond the Create Index StatementIndexing Strategies for Oracle Databases - Beyond the Create Index Statement
Indexing Strategies for Oracle Databases - Beyond the Create Index StatementSean Scott
 

Was ist angesagt? (20)

Histograms in 12c era
Histograms in 12c eraHistograms in 12c era
Histograms in 12c era
 
Electronics for-you-projects-and-ideas-2000
Electronics for-you-projects-and-ideas-2000Electronics for-you-projects-and-ideas-2000
Electronics for-you-projects-and-ideas-2000
 
Is your SQL Exadata-aware?
Is your SQL Exadata-aware?Is your SQL Exadata-aware?
Is your SQL Exadata-aware?
 
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
 
Mini Projects Handbook
Mini Projects HandbookMini Projects Handbook
Mini Projects Handbook
 
MariaDB: Engine Independent Table Statistics, including histograms
MariaDB: Engine Independent Table Statistics, including histogramsMariaDB: Engine Independent Table Statistics, including histograms
MariaDB: Engine Independent Table Statistics, including histograms
 
MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07
 
Date data type and Globalization in Oracle
Date data type and Globalization in OracleDate data type and Globalization in Oracle
Date data type and Globalization in Oracle
 
New features-in-mariadb-and-mysql-optimizers
New features-in-mariadb-and-mysql-optimizersNew features-in-mariadb-and-mysql-optimizers
New features-in-mariadb-and-mysql-optimizers
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor format
 
Introduction to Parallel Processing Algorithms in Shared Nothing Databases
Introduction to Parallel Processing Algorithms in Shared Nothing DatabasesIntroduction to Parallel Processing Algorithms in Shared Nothing Databases
Introduction to Parallel Processing Algorithms in Shared Nothing Databases
 
The Cost Based Optimiser in 11gR2
The Cost Based Optimiser in 11gR2The Cost Based Optimiser in 11gR2
The Cost Based Optimiser in 11gR2
 
Full Table Scan: friend or foe
Full Table Scan: friend or foeFull Table Scan: friend or foe
Full Table Scan: friend or foe
 
Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
 Design and Develop SQL DDL statements which demonstrate the use of SQL objec... Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
 
Things you should know about Oracle truncate
Things you should know about Oracle truncateThings you should know about Oracle truncate
Things you should know about Oracle truncate
 
A deep look at the cql where clause
A deep look at the cql where clauseA deep look at the cql where clause
A deep look at the cql where clause
 
DataStax: A deep look at the CQL WHERE clause
DataStax: A deep look at the CQL WHERE clauseDataStax: A deep look at the CQL WHERE clause
DataStax: A deep look at the CQL WHERE clause
 
MySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That BiteMySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That Bite
 
Optimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCOptimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COC
 
Indexing Strategies for Oracle Databases - Beyond the Create Index Statement
Indexing Strategies for Oracle Databases - Beyond the Create Index StatementIndexing Strategies for Oracle Databases - Beyond the Create Index Statement
Indexing Strategies for Oracle Databases - Beyond the Create Index Statement
 

Ähnlich wie Oracle Diagnostics : Explain Plans (Simple)

Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleGuatemala User Group
 
5 Cool Things About SQL
5 Cool Things About SQL5 Cool Things About SQL
5 Cool Things About SQLConnor McDonald
 
Oracle 122 partitioning_in_action_slide_share
Oracle 122 partitioning_in_action_slide_shareOracle 122 partitioning_in_action_slide_share
Oracle 122 partitioning_in_action_slide_shareThomas Teske
 
Oracle 11g caracteristicas poco documentadas 3 en 1
Oracle 11g caracteristicas poco documentadas 3 en 1Oracle 11g caracteristicas poco documentadas 3 en 1
Oracle 11g caracteristicas poco documentadas 3 en 1Ronald Francisco Vargas Quesada
 
Managing Statistics for Optimal Query Performance
Managing Statistics for Optimal Query PerformanceManaging Statistics for Optimal Query Performance
Managing Statistics for Optimal Query PerformanceKaren Morton
 
Do You Know The 11g Plan?
Do You Know The 11g Plan?Do You Know The 11g Plan?
Do You Know The 11g Plan?Mahesh Vallampati
 
SQLăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ç·ćˆèšș療Oracle CloudWorldć‡șćŒ”æ‰€
SQLăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ç·ćˆèšș療Oracle CloudWorldć‡șćŒ”æ‰€SQLăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ç·ćˆèšș療Oracle CloudWorldć‡șćŒ”æ‰€
SQLăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ç·ćˆèšș療Oracle CloudWorldć‡șćŒ”æ‰€Hiroshi Sekiguchi
 
Oracle Diagnostics : Joins - 1
Oracle Diagnostics : Joins - 1Oracle Diagnostics : Joins - 1
Oracle Diagnostics : Joins - 1Hemant K Chitale
 
Writing efficient sql
Writing efficient sqlWriting efficient sql
Writing efficient sqlj9soto
 
Informix Warehouse Accelerator (IWA) features in version 12.1
Informix Warehouse Accelerator (IWA) features in version 12.1Informix Warehouse Accelerator (IWA) features in version 12.1
Informix Warehouse Accelerator (IWA) features in version 12.1Keshav Murthy
 
EvolveExecutionPlans.pdf
EvolveExecutionPlans.pdfEvolveExecutionPlans.pdf
EvolveExecutionPlans.pdfPraveenPolu1
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersRiyaj Shamsudeen
 
Oracle Diagnostics : Locks and Lock Trees
Oracle Diagnostics :  Locks and Lock TreesOracle Diagnostics :  Locks and Lock Trees
Oracle Diagnostics : Locks and Lock TreesHemant K Chitale
 
ïżŒAdvanced Query Optimizer Tuning and Analysis
ïżŒAdvanced Query Optimizer Tuning and AnalysisïżŒAdvanced Query Optimizer Tuning and Analysis
ïżŒAdvanced Query Optimizer Tuning and AnalysisMYXPLAIN
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Nelson Calero
 
Connor McDonald Partitioning
Connor McDonald PartitioningConnor McDonald Partitioning
Connor McDonald PartitioningInSync Conference
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
ВĐČĐ”ĐŽĐ”ĐœĐžĐ” ĐČ ŃĐŸĐČŃ€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ PostgreSQL. Часть 2
ВĐČĐ”ĐŽĐ”ĐœĐžĐ” ĐČ ŃĐŸĐČŃ€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ PostgreSQL. Часть 2ВĐČĐ”ĐŽĐ”ĐœĐžĐ” ĐČ ŃĐŸĐČŃ€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ PostgreSQL. Часть 2
ВĐČĐ”ĐŽĐ”ĐœĐžĐ” ĐČ ŃĐŸĐČŃ€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ PostgreSQL. Часть 2Dzianis Pirshtuk
 
A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013Connor McDonald
 
More than 12 More things about Oracle Database 12c
More than 12 More things about Oracle Database 12cMore than 12 More things about Oracle Database 12c
More than 12 More things about Oracle Database 12cGuatemala User Group
 

Ähnlich wie Oracle Diagnostics : Explain Plans (Simple) (20)

Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
 
5 Cool Things About SQL
5 Cool Things About SQL5 Cool Things About SQL
5 Cool Things About SQL
 
Oracle 122 partitioning_in_action_slide_share
Oracle 122 partitioning_in_action_slide_shareOracle 122 partitioning_in_action_slide_share
Oracle 122 partitioning_in_action_slide_share
 
Oracle 11g caracteristicas poco documentadas 3 en 1
Oracle 11g caracteristicas poco documentadas 3 en 1Oracle 11g caracteristicas poco documentadas 3 en 1
Oracle 11g caracteristicas poco documentadas 3 en 1
 
Managing Statistics for Optimal Query Performance
Managing Statistics for Optimal Query PerformanceManaging Statistics for Optimal Query Performance
Managing Statistics for Optimal Query Performance
 
Do You Know The 11g Plan?
Do You Know The 11g Plan?Do You Know The 11g Plan?
Do You Know The 11g Plan?
 
SQLăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ç·ćˆèšș療Oracle CloudWorldć‡șćŒ”æ‰€
SQLăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ç·ćˆèšș療Oracle CloudWorldć‡șćŒ”æ‰€SQLăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ç·ćˆèšș療Oracle CloudWorldć‡șćŒ”æ‰€
SQLăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ç·ćˆèšș療Oracle CloudWorldć‡șćŒ”æ‰€
 
Oracle Diagnostics : Joins - 1
Oracle Diagnostics : Joins - 1Oracle Diagnostics : Joins - 1
Oracle Diagnostics : Joins - 1
 
Writing efficient sql
Writing efficient sqlWriting efficient sql
Writing efficient sql
 
Informix Warehouse Accelerator (IWA) features in version 12.1
Informix Warehouse Accelerator (IWA) features in version 12.1Informix Warehouse Accelerator (IWA) features in version 12.1
Informix Warehouse Accelerator (IWA) features in version 12.1
 
EvolveExecutionPlans.pdf
EvolveExecutionPlans.pdfEvolveExecutionPlans.pdf
EvolveExecutionPlans.pdf
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineers
 
Oracle Diagnostics : Locks and Lock Trees
Oracle Diagnostics :  Locks and Lock TreesOracle Diagnostics :  Locks and Lock Trees
Oracle Diagnostics : Locks and Lock Trees
 
ïżŒAdvanced Query Optimizer Tuning and Analysis
ïżŒAdvanced Query Optimizer Tuning and AnalysisïżŒAdvanced Query Optimizer Tuning and Analysis
ïżŒAdvanced Query Optimizer Tuning and Analysis
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
 
Connor McDonald Partitioning
Connor McDonald PartitioningConnor McDonald Partitioning
Connor McDonald Partitioning
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
ВĐČĐ”ĐŽĐ”ĐœĐžĐ” ĐČ ŃĐŸĐČŃ€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ PostgreSQL. Часть 2
ВĐČĐ”ĐŽĐ”ĐœĐžĐ” ĐČ ŃĐŸĐČŃ€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ PostgreSQL. Часть 2ВĐČĐ”ĐŽĐ”ĐœĐžĐ” ĐČ ŃĐŸĐČŃ€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ PostgreSQL. Часть 2
ВĐČĐ”ĐŽĐ”ĐœĐžĐ” ĐČ ŃĐŸĐČŃ€Đ”ĐŒĐ”ĐœĐœŃƒŃŽ PostgreSQL. Часть 2
 
A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013
 
More than 12 More things about Oracle Database 12c
More than 12 More things about Oracle Database 12cMore than 12 More things about Oracle Database 12c
More than 12 More things about Oracle Database 12c
 

Mehr von Hemant K Chitale

Oracle : Monitoring and Diagnostics without OEM
Oracle : Monitoring and Diagnostics without OEMOracle : Monitoring and Diagnostics without OEM
Oracle : Monitoring and Diagnostics without OEMHemant K Chitale
 
Oracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and EnqueuesOracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and EnqueuesHemant K Chitale
 
Partitioning Tables and Indexing Them --- Article
Partitioning Tables and Indexing Them --- ArticlePartitioning Tables and Indexing Them --- Article
Partitioning Tables and Indexing Them --- ArticleHemant K Chitale
 
Oracle database performance diagnostics - before your begin
Oracle database performance diagnostics  - before your beginOracle database performance diagnostics  - before your begin
Oracle database performance diagnostics - before your beginHemant K Chitale
 
The role of the dba
The role of the dba The role of the dba
The role of the dba Hemant K Chitale
 
Partitioning tables and indexing them
Partitioning tables and indexing them Partitioning tables and indexing them
Partitioning tables and indexing them Hemant K Chitale
 

Mehr von Hemant K Chitale (7)

SQL Tracing
SQL TracingSQL Tracing
SQL Tracing
 
Oracle : Monitoring and Diagnostics without OEM
Oracle : Monitoring and Diagnostics without OEMOracle : Monitoring and Diagnostics without OEM
Oracle : Monitoring and Diagnostics without OEM
 
Oracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and EnqueuesOracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and Enqueues
 
Partitioning Tables and Indexing Them --- Article
Partitioning Tables and Indexing Them --- ArticlePartitioning Tables and Indexing Them --- Article
Partitioning Tables and Indexing Them --- Article
 
Oracle database performance diagnostics - before your begin
Oracle database performance diagnostics  - before your beginOracle database performance diagnostics  - before your begin
Oracle database performance diagnostics - before your begin
 
The role of the dba
The role of the dba The role of the dba
The role of the dba
 
Partitioning tables and indexing them
Partitioning tables and indexing them Partitioning tables and indexing them
Partitioning tables and indexing them
 

KĂŒrzlich hochgeladen

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
(Genuine) Escort Service Lucknow | Starting â‚č,5K To @25k with A/C đŸ§‘đŸœâ€â€ïžâ€đŸ§‘đŸ» 89...
(Genuine) Escort Service Lucknow | Starting â‚č,5K To @25k with A/C đŸ§‘đŸœâ€â€ïžâ€đŸ§‘đŸ» 89...(Genuine) Escort Service Lucknow | Starting â‚č,5K To @25k with A/C đŸ§‘đŸœâ€â€ïžâ€đŸ§‘đŸ» 89...
(Genuine) Escort Service Lucknow | Starting â‚č,5K To @25k with A/C đŸ§‘đŸœâ€â€ïžâ€đŸ§‘đŸ» 89...gurkirankumar98700
 
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂anilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

KĂŒrzlich hochgeladen (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Call Girls In Mukherjee Nagar đŸ“± 9999965857 đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar đŸ“±  9999965857  đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar đŸ“±  9999965857  đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar đŸ“± 9999965857 đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SE...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
(Genuine) Escort Service Lucknow | Starting â‚č,5K To @25k with A/C đŸ§‘đŸœâ€â€ïžâ€đŸ§‘đŸ» 89...
(Genuine) Escort Service Lucknow | Starting â‚č,5K To @25k with A/C đŸ§‘đŸœâ€â€ïžâ€đŸ§‘đŸ» 89...(Genuine) Escort Service Lucknow | Starting â‚č,5K To @25k with A/C đŸ§‘đŸœâ€â€ïžâ€đŸ§‘đŸ» 89...
(Genuine) Escort Service Lucknow | Starting â‚č,5K To @25k with A/C đŸ§‘đŸœâ€â€ïžâ€đŸ§‘đŸ» 89...
 
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Oracle Diagnostics : Explain Plans (Simple)

  • 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>