Home » RDBMS Server » Performance Tuning » Reading explain plan (11GR2 RAC on Windows)
Reading explain plan [message #528378] Mon, 24 October 2011 10:11 Go to next message
Kwisatz78
Messages: 24
Registered: October 2011
Junior Member
Hi all

I am very wet behind the ears when it comes to Oracle, however I was able to identify a poorly performing query that seemed to be maxing out our CPU. I have been trying to understand the Explain Plan. The plan below is from our test system which has considerably less information in the tables than our PROD system.

I can see there are a bunch of table scans at the end which may indicate missing indexes, but I am unclear on whether this is actually a problem as the %CPU seems to be worse for the JOIN near the top of the plan.

Can anyone explain(no pun intended) to me how to read the plans and where our issue lies?

Many thanks

-------------------------------------------------------------------------------------------------------------------------------
| Id  | Operation                   | Name                    | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     | Inst   |IN-OUT|
-------------------------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT            |                         |  1870M|  3018G|       |   677M  (1)|999:59:59 |        |      |
|   1 |  SORT ORDER BY              |                         |  1870M|  3018G|  3567G|   677M  (1)|999:59:59 |        |      |
|*  2 |   HASH JOIN RIGHT OUTER     |                         |  1870M|  3018G|       | 10031  (93)| 00:02:01 |        |      |
|   3 |    VIEW                     | VW_CUSTDOCUMENTCATEGORY |  1397 |   526K|       |     7  (15)| 00:00:01 |        |      |
|   4 |     REMOTE                  |                         |       |       |       |            |          | DB~    | R->S |
|*  5 |    HASH JOIN RIGHT OUTER    |                         |    22M|    28G|       |   837  (15)| 00:00:11 |        |      |
|   6 |     VIEW                    | VW_CUSTOMCLRNLIST       |  1397 |   387K|       |     7  (15)| 00:00:01 |        |      |
|   7 |      REMOTE                 |                         |       |       |       |            |          | DB~    | R->S |
|*  8 |     HASH JOIN RIGHT OUTER   |                         |   407K|   412M|       |   718   (2)| 00:00:09 |        |      |
|   9 |      VIEW                   | VW_CUSTDOCUMENTTYPE     |  1397 |   526K|       |     7  (15)| 00:00:01 |        |      |
|  10 |       REMOTE                |                         |       |       |       |            |          | DB~    | R->S |
|* 11 |      HASH JOIN RIGHT OUTER  |                         | 20702 |    13M|       |   709   (2)| 00:00:09 |        |      |
|  12 |       VIEW                  | VW_CUSTDOCUMENTLEVEL    |   100 | 38600 |       |     3  (34)| 00:00:01 |        |      |
|  13 |        REMOTE               |                         |       |       |       |            |          | DB~    | R->S |
|* 14 |       HASH JOIN             |                         |  1449 |   411K|       |   706   (1)| 00:00:09 |        |      |
|* 15 |        HASH JOIN            |                         |  1446 |   355K|       |   569   (2)| 00:00:07 |        |      |
|* 16 |         HASH JOIN           |                         |  1549 |   119K|       |   310   (2)| 00:00:04 |        |      |
|  17 |          VIEW               | VW_SQ_1                 | 22690 |   709K|       |   155   (2)| 00:00:02 |        |      |
|  18 |           HASH GROUP BY     |                         | 22690 |   487K|       |   155   (2)| 00:00:02 |        |      |
|  19 |            TABLE ACCESS FULL| REVISIONS               | 23233 |   499K|       |   154   (1)| 00:00:02 |        |      |
|* 20 |          TABLE ACCESS FULL  | REVISIONS               | 23231 |  1066K|       |   154   (1)| 00:00:02 |        |      |
|  21 |         TABLE ACCESS FULL   | DOCMETA                 | 21691 |  3664K|       |   258   (1)| 00:00:04 |        |      |
|* 22 |        TABLE ACCESS FULL    | DOCUMENTS               | 21737 |   827K|       |   137   (1)| 00:00:02 |        |      |
-------------------------------------------------------------------------------------------------------------------------------



* <code_tags> added by BlackSwan

[Updated on: Mon, 24 October 2011 10:17] by Moderator

Report message to a moderator

Re: Reading explain plan [message #528381 is a reply to message #528378] Mon, 24 October 2011 10:14 Go to previous messageGo to next message
Kwisatz78
Messages: 24
Registered: October 2011
Junior Member
Sorry the formatting has been lost when I posted
Re: Reading explain plan [message #528384 is a reply to message #528381] Mon, 24 October 2011 10:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Kwisatz78 wrote on Mon, 24 October 2011 17:14
Sorry the formatting has been lost when I posted


Please read How to use [code] tags and make your code easier to read.

Regards
Michel
Re: Reading explain plan [message #528385 is a reply to message #528384] Mon, 24 October 2011 10:25 Go to previous messageGo to next message
Kwisatz78
Messages: 24
Registered: October 2011
Junior Member
Ah sorry, thanks for that.
Re: Reading explain plan [message #529076 is a reply to message #528385] Fri, 28 October 2011 10:21 Go to previous message
Vackar
Messages: 81
Registered: October 2007
Member
Hi,

2 Questions:
1 - What was the original query
2 - What are the filter/access predicates in the explain plan

Thanks,
Vackar
Previous Topic: Query performance diff
Next Topic: buffer busy wait
Goto Forum:
  


Current Time: Sun Nov 24 12:37:23 CST 2024