Need to explain Plan output in HTML format

Hello

I have details slider sqlid and child. And I'm able to generate explain plan SQL running as below

SELECT * FROM table (DBMS_XPLAN. DISPLAY_CURSOR('xxxxxxxxxxxxxx',0,'ALLSTATS'));

I need send the output of this customer. and the problem is the customer wants in HTML format. Advice to reel in HTML format

concerning

Pravin

You can always query the PLAN_TABLE directly, and use SQL * more to empty in HTML.

Another option is to do this with SQL Developer. Paste the SQL statement into the worksheet, and then press the explain Plan. When you see the plan, right-click on it and choose export as HTML.

See you soon,.
Brian

Tags: Database

Similar Questions

  • Understanding explain plan output

    Hello
    Version 11202.
    Below is the output from tkprof against a statement that time cpu = time elapsed = ~ 3000 s.
    The statement is related to oracle EBS, but the bellows of the question is in what regards the execution plan.
    As you can see in the bellows of diet most of the time is to take the next step:
             0          0          0      TABLE ACCESS BY INDEX ROWID IBY_PMT_INSTR_USES_ALL (cr=44630892 pr=31557 pw=0 time=3075553107 us cost=3 size=95402360 card=2385059)
    2059303280 2059303280 2059303280       INDEX RANGE SCAN IBY_PMT_INSTR_USES_ALL_N2 (cr=13320705 pr=104 pw=0 time=1459328515 us cost=2 size=0 card=8)(object id 14313388)
    What I'm trying to understand is why lines 2b (2059303280) has been consulted by index IBY_PMT_INSTR_USES_ALL_N2
    SQL> select table_name,num_rows,sample_size,last_analyzed from dba_tables where table_name='IBY_PMT_INSTR_USES_ALL';
    
    TABLE_NAME NUM_ROWS SAMPLE_SIZE LAST_ANAL
    ------------------------------ ---------- ----------- ---------
    IBY_PMT_INSTR_USES_ALL 2414470 241447 28-JAN-13
    
    SQL> select table_name,distinct_keys,clustering_factor,num_rows,sample_size,last_analyzed from dba_indexes where index_name='IBY_PMT_INSTR_USES_ALL_N2';
    
    TABLE_NAME DISTINCT_KEYS CLUSTERING_FACTOR NUM_ROWS SAMPLE_SIZE LAST_ANAL
    ------------------------------ ------------- ----------------- ---------- ----------- ---------
    IBY_PMT_INSTR_USES_ALL 304515 267170 2407170 240717 28-JAN-13
    The entire statement and plan is as follows:
    insert into iby_pmt_instr_uses_all (instrument_payment_use_id,payment_flow,
      ext_pmt_party_id,instrument_type,instrument_id,payment_function,
      order_of_preference,created_by,creation_date,last_updated_by,
      last_update_date,last_update_login,object_version_number,start_date,
      end_date,debit_auth_flag,debit_auth_method,debit_auth_reference,
      debit_auth_begin,debit_auth_end)select iby_pmt_instr_uses_all_s.nextval  ,
      'FUNDS_CAPTURE' ,iep.ext_payer_id ,'BANKACCOUNT' ,eba.ext_bank_account_id ,
      'CUSTOMER_PAYMENT' ,DECODE(cbi.primary_flag,'Y',1,10) ,:b0 ,SYSDATE ,:b0 ,
      SYSDATE ,:b2 ,1 ,cbi.start_date ,cbi.end_date ,'' ,'' ,'' ,'' ,''  from 
      iby_external_payers_all iep ,hz_cust_accounts hca ,hz_cust_site_uses_all 
      csu ,hz_cust_acct_sites_all cas ,hz_parties hzba ,hz_relationships hzr ,
      hz_code_assignments hcba ,hz_parties hzbb ,hz_organization_profiles hop ,
      hz_code_assignments hcbb ,iby_ext_bank_accounts eba ,
      ra_customer_banks_int_all cbi where 
      (((((((((((((((((((((((((((((((((((((((cbi.interface_status is null  and 
      cbi.request_id=:b3) and UPPER(cbi.bank_name)=UPPER(hzba.party_name)) and 
      hzba.party_id=hop.party_id) and SYSDATE between 
      TRUNC(hop.effective_start_date) and NVL(TRUNC(hop.effective_end_date),
      (SYSDATE+1))) and hcba.class_category='BANK_INSTITUTION_TYPE') and 
      hcba.class_code='BANK') and hcba.owner_table_name='HZ_PARTIES') and 
      hcba.owner_table_id=hzba.party_id) and cbi.bank_home_country=
      hop.home_country) and hzbb.party_id=hcbb.owner_table_id) and 
      hcbb.owner_table_name='HZ_PARTIES') and hcbb.class_category=
      'BANK_INSTITUTION_TYPE') and hcbb.class_code='BANK_BRANCH') and 
      nvl(hcbb.status,'A')='A') and hzbb.party_id=hzr.subject_id) and 
      hzba.party_id=hzr.object_id) and hzr.relationship_type='BANK_AND_BRANCH') 
      and hzr.relationship_code='BRANCH_OF') and hzr.status='A') and 
      hzr.subject_table_name='HZ_PARTIES') and hzr.subject_type='ORGANIZATION') 
      and hzr.object_table_name='HZ_PARTIES') and hzr.object_type='ORGANIZATION') 
      and UPPER(cbi.bank_branch_name)=UPPER(hzbb.party_name)) and hzbb.party_id=
      eba.branch_id) and hzba.party_id=eba.bank_id) and eba.bank_account_num=
      cbi.bank_account_num) and eba.currency_code=cbi.bank_account_currency_code) 
      and cbi.orig_system_customer_ref=hca.orig_system_reference) and 
      iep.cust_account_id=hca.cust_account_id) and iep.party_id=hca.party_id) and 
      ((cbi.orig_system_address_ref is null  and iep.org_id is null ) or 
      iep.org_id=cbi.org_id)) and ((cbi.orig_system_address_ref is null  and 
      iep.org_type is null ) or iep.org_type='OPERATING_UNIT')) and cbi.org_id=
      cas.org_id(+)) and nvl(iep.acct_site_use_id,(-1))=
      decode(cbi.orig_system_address_ref,null ,(-1),csu.site_use_id)) and 
      cbi.orig_system_address_ref=cas.orig_system_reference(+)) and 
      (csu.site_use_id=(select min(site_use_id)  from hz_cust_site_uses_all hcsua 
      where ((hcsua.cust_acct_site_id=cas.cust_acct_site_id and 
      hcsua.site_use_code='BILL_TO') and hcsua.status='A')) or csu.site_use_id is 
      null )) and cas.cust_acct_site_id=csu.cust_acct_site_id(+)) and  not exists 
      (select 'x'  from iby_pmt_instr_uses_all ipi where (((ipi.ext_pmt_party_id=
      iep.ext_payer_id and ipi.instrument_type='BANKACCOUNT') and 
      ipi.instrument_id=eba.ext_bank_account_id) and ipi.payment_function=
      'CUSTOMER_PAYMENT')))
    
    
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1   3049.58    3080.23      31827   44696023       1587        1175
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        2   3049.58    3080.23      31827   44696023       1587        1175
    
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 57  (APPS)
    Number of plan statistics captured: 1
    
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
    ---------- ---------- ----------  ---------------------------------------------------
             0          0          0  LOAD TABLE CONVENTIONAL  (cr=44696030 pr=31827 pw=0 time=2870820188 us)
          1175       1175       1175   SEQUENCE  IBY_PMT_INSTR_USES_ALL_S (cr=44695967 pr=31774 pw=0 time=3270855802 us)
          1175       1175       1175    FILTER  (cr=44695960 pr=31774 pw=0 time=3270803657 us)
          1175       1175       1175     NESTED LOOPS ANTI (cr=44695844 pr=31774 pw=0 time=3270739008 us cost=251 size=497 card=1)
          1175       1175       1175      NESTED LOOPS  (cr=64952 pr=217 pw=0 time=2991575 us cost=248 size=457 card=1)
          1175       1175       1175       NESTED LOOPS  (cr=64827 pr=205 pw=0 time=2949382 us cost=245 size=423 card=1)
          1175       1175       1175        NESTED LOOPS OUTER (cr=63494 pr=205 pw=0 time=2921176 us cost=243 size=403 card=1)
          1175       1175       1175         NESTED LOOPS  (cr=63377 pr=205 pw=0 time=2893312 us cost=240 size=391 card=1)
          1175       1175       1175          NESTED LOOPS  (cr=61415 pr=205 pw=0 time=2850064 us cost=236 size=348 card=1)
         47434      47434      47434           NESTED LOOPS  (cr=57058 pr=205 pw=0 time=2565056 us cost=234 size=328 card=1)
         41203      41203      41203            NESTED LOOPS OUTER (cr=42422 pr=0 pw=0 time=581594 us cost=230 size=296 card=1)
         41203      41203      41203             HASH JOIN  (cr=1049 pr=0 pw=0 time=173751 us cost=229 size=277 card=1)
          2333       2333       2333              NESTED LOOPS  (cr=1013 pr=0 pw=0 time=32850 us)
          2333       2333       2333               NESTED LOOPS  (cr=825 pr=0 pw=0 time=22036 us cost=208 size=172 card=1)
           514        514        514                NESTED LOOPS  (cr=691 pr=0 pw=0 time=16378 us cost=206 size=88 card=1)
           514        514        514                 NESTED LOOPS  (cr=588 pr=0 pw=0 time=7190 us cost=95 size=2501 card=41)
           514        514        514                  TABLE ACCESS BY INDEX ROWID HZ_CODE_ASSIGNMENTS (cr=20 pr=0 pw=0 time=1716 us cost=10 size=1681 card=41)
           514        514        514                   INDEX RANGE SCAN HZ_CODE_ASSIGNMENTS_N1 (cr=7 pr=0 pw=0 time=464 us cost=4 size=0 card=164)(object id 464630)
           514        514        514                  TABLE ACCESS BY INDEX ROWID HZ_PARTIES (cr=568 pr=0 pw=0 time=2797 us cost=2 size=20 card=1)
           514        514        514                   INDEX UNIQUE SCAN HZ_PARTIES_U1 (cr=54 pr=0 pw=0 time=1059 us cost=1 size=0 card=1)(object id 421661)
           514        514        514                 TABLE ACCESS BY INDEX ROWID HZ_ORGANIZATION_PROFILES (cr=103 pr=0 pw=0 time=5913 us cost=3 size=27 card=1)
           514        514        514                  INDEX RANGE SCAN BZ_HZ_ORGANIZATION_PROFILE_N1 (cr=76 pr=0 pw=0 time=2873 us cost=2 size=0 card=1)(object id 9378840)
          2333       2333       2333                INDEX RANGE SCAN HZ_RELATIONSHIPS_N2 (cr=134 pr=0 pw=0 time=3962 us cost=1 size=0 card=1)(object id 11581198)
          2333       2333       2333               TABLE ACCESS BY INDEX ROWID HZ_RELATIONSHIPS (cr=188 pr=0 pw=0 time=7476 us cost=2 size=84 card=1)
          1175       1175       1175              TABLE ACCESS FULL RA_CUSTOMER_BANKS_INT_ALL (cr=36 pr=0 pw=0 time=9479 us cost=21 size=123375 card=1175)
         41203      41203      41203             TABLE ACCESS BY INDEX ROWID HZ_CUST_ACCT_SITES_ALL (cr=41373 pr=0 pw=0 time=304952 us cost=1 size=19 card=1)
         41203      41203      41203              INDEX UNIQUE SCAN HZ_CUST_ACCT_SITES_U2 (cr=170 pr=0 pw=0 time=93830 us cost=1 size=0 card=1)(object id 421730)
         47434      47434      47434            TABLE ACCESS BY INDEX ROWID IBY_EXT_BANK_ACCOUNTS (cr=14636 pr=205 pw=0 time=2375333 us cost=4 size=32 card=1)
         47434      47434      47434             INDEX RANGE SCAN IBY_EXT_BANK_ACCOUNTS_N6 (cr=3548 pr=94 pw=0 time=1112297 us cost=2 size=0 card=1)(object id 14313177)
          1175       1175       1175           TABLE ACCESS BY INDEX ROWID HZ_PARTIES (cr=4357 pr=0 pw=0 time=171450 us cost=2 size=20 card=1)
          1203       1203       1203            INDEX UNIQUE SCAN HZ_PARTIES_U1 (cr=3154 pr=0 pw=0 time=107886 us cost=1 size=0 card=1)(object id 421661)
          1175       1175       1175          TABLE ACCESS BY INDEX ROWID HZ_CODE_ASSIGNMENTS (cr=1962 pr=0 pw=0 time=41107 us cost=3 size=43 card=1)
          1175       1175       1175           INDEX RANGE SCAN HZ_CODE_ASSIGNMENTS_U2 (cr=1611 pr=0 pw=0 time=25716 us cost=2 size=0 card=1)(object id 14355645)
          1175       1175       1175         TABLE ACCESS BY INDEX ROWID HZ_CUST_SITE_USES_ALL (cr=117 pr=0 pw=0 time=14875 us cost=3 size=12 card=1)
          1175       1175       1175          INDEX RANGE SCAN HZ_CUST_SITE_USES_N1 (cr=86 pr=0 pw=0 time=10600 us cost=2 size=0 card=1)(object id 464289)
          1175       1175       1175        TABLE ACCESS BY INDEX ROWID HZ_CUST_ACCOUNTS (cr=1333 pr=0 pw=0 time=22634 us cost=2 size=20 card=1)
          1175       1175       1175         INDEX UNIQUE SCAN HZ_CUST_ACCOUNTS_U3 (cr=158 pr=0 pw=0 time=9307 us cost=1 size=0 card=1)(object id 9438627)
          1175       1175       1175       TABLE ACCESS BY INDEX ROWID IBY_EXTERNAL_PAYERS_ALL (cr=125 pr=12 pw=0 time=131366 us cost=3 size=34 card=1)
          1175       1175       1175        INDEX RANGE SCAN IBY_EXTERNAL_PAYERS_ALL_U2 (cr=109 pr=4 pw=0 time=51266 us cost=2 size=0 card=1)(object id 14313089)
             0          0          0      TABLE ACCESS BY INDEX ROWID IBY_PMT_INSTR_USES_ALL (cr=44630892 pr=31557 pw=0 time=3075553107 us cost=3 size=95402360 card=2385059)
    2059303280 2059303280 2059303280       INDEX RANGE SCAN IBY_PMT_INSTR_USES_ALL_N2 (cr=13320705 pr=104 pw=0 time=1459328515 us cost=2 size=0 card=8)(object id 14313388)
          1000       1000       1000     SORT AGGREGATE (cr=116 pr=0 pw=0 time=39211 us)
          1000       1000       1000      TABLE ACCESS BY INDEX ROWID HZ_CUST_SITE_USES_ALL (cr=116 pr=0 pw=0 time=27041 us cost=4 size=22 card=1)
          1000       1000       1000       INDEX RANGE SCAN HZ_CUST_SITE_USES_N1 (cr=85 pr=0 pw=0 time=19027 us cost=3 size=0 card=1)(object id 464289)

    Yoav wrote:

    and  not exists
    (select 'x'  from iby_pmt_instr_uses_all ipi where (((ipi.ext_pmt_party_id=
    iep.ext_payer_id and ipi.instrument_type='BANKACCOUNT') and
    ipi.instrument_id=eba.ext_bank_account_id) and ipi.payment_function=
    'CUSTOMER_PAYMENT')))
    Number of plan statistics captured: 1
    
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
    ---------- ---------- ----------  ---------------------------------------------------
    0          0          0  LOAD TABLE CONVENTIONAL  (cr=44696030 pr=31827 pw=0 time=2870820188 us)
    1175       1175       1175   SEQUENCE  IBY_PMT_INSTR_USES_ALL_S (cr=44695967 pr=31774 pw=0 time=3270855802 us)
    1175       1175       1175    FILTER  (cr=44695960 pr=31774 pw=0 time=3270803657 us)
    1175       1175       1175     NESTED LOOPS ANTI (cr=44695844 pr=31774 pw=0 time=3270739008 us cost=251 size=497 card=1)
    1175       1175       1175      NESTED LOOPS  (cr=64952 pr=217 pw=0 time=2991575 us cost=248 size=457 card=1)
    ...
    0          0          0      TABLE ACCESS BY INDEX ROWID IBY_PMT_INSTR_USES_ALL (cr=44630892 pr=31557 pw=0 time=3075553107 us cost=3 size=95402360 card=2385059)
    2059303280 2059303280 2059303280       INDEX RANGE SCAN IBY_PMT_INSTR_USES_ALL_N2 (cr=13320705 pr=104 pw=0 time=1459328515 us cost=2 size=0 card=8)(object id 14313388)
    1000       1000       1000     SORT AGGREGATE (cr=116 pr=0 pw=0 time=39211 us)
    1000       1000       1000      TABLE ACCESS BY INDEX ROWID HZ_CUST_SITE_USES_ALL (cr=116 pr=0 pw=0 time=27041 us cost=4 size=22 card=1)
    1000       1000       1000       INDEX RANGE SCAN HZ_CUST_SITE_USES_N1 (cr=85 pr=0 pw=0 time=19027 us cost=3 size=0 card=1)(object id 464289)
    

    You have a subquery "does not exist" that the optimizer turned in a nested loop join anti.

    For each of the 1175 lines returned by the previous step that oracle did a scan of interval it considers the most appropriate index - numbers cost (2) and map (8) at this show of line shot something went wrong with the optimizer, and estimates for each of the prior lines 1175, he gained an average 1.7 M entries index based on the predicates of the index then went to the table and put at the disposal of the resulting line.

    It seems that if the index is a bad choice of index - you need to check the predicates of index for the plan - dbms_xplan allows you to remove it from memory; and check your clues to whether there is a better one than the optimizer should have chosen

    Concerning
    Jonathan Lewis

  • (Duplicated assets) When the output in HTML format.

    I was wondering why Muse will duplicate a current png when used multiple times on a page? It should not just a link to a version of the asset and the sweater for several instances of the page? Output folder DC that I use the png about 60 times in compositions it is duplicated 60 times in the HTML code. This seems wrong to me.

    Any info would be much appreciated.

    Thank you

    Ryan.

    I think we're good now. Tried checking and unchecking the "Convert opaque png" and it finally worked. A little strange. I would say that it worked for the most part well. It's still do duplicate an another place PNG file, but only a couple of times. Size shows to be the same for this one too, but I will work through to understand.  Thank you for the help mac_heibu and Zak.

    Sincerely,

    Ryan.

  • Snapshot of information output in html format

    Hello

    I have this beautiful oneliner to show some information snapshot:

    ' Get - VM | Get-Snapshot | SELECT name, Description, VM, SizeMB.

    I want to get this output and output to an html file.

    Is it possible to do that?

    Thank you

    Erik

    Since you have access to the .net PowerShell functions, you can make

    Get - VM | Get-Snapshot |

    Select VM,Name,Description,@{N="SizeGB; E = {[math]: tour ($_.)} {{SizeGB, 0}} |
    ConvertTo-HTML | Out-file C:\Scripts\Test.htm

  • Explain Plan shows not good results.

    Hi gurus,

    Please help me understand under question.

    Whenever I have do explain plan on any sql statements he says as explained but when retriving explain plan output it shows same results again and again.

    DB - 11 GR 2 Stand alone
    ASM - configured.
    OS - RHEL 6.2.


    SQL > select count (*) in the t2114;

    COUNT (*)
    ----------
    639292

    SQL > explain plan for select count (*) from t2114;

    He explained.

    SQL > @?/rdbms/admin/utlxpls.sql

    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Hash value of plan: 1497650422

    ----------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 6634. 524K | 2993 (19) | 00:00:01 |
    | 1. SORT ORDER BY | 6634. 524K | 2993 (19) | 00:00:01 |
    | 2. TABLE ACCESS BY INDEX ROWID | T2210 | 6634. 524K | 2947 (17) | 00:00:01 |
    |* 3 | INDEX RANGE SCAN | T2210_T | 6842. 108 (22) | 00:00:01 |
    ----------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    3 - access("T2210".") C490008000 ' =: SYS_B_0 AND "T2210".» C490009100 ' =: SYS_B_2.
    (AND "T2210". ' C301363300 '= TO_NUMBER (:SYS_B_1)).

    16 selected lines.


    SQL > explain the plan for
    2. SELECT T2114. C1 FROM T2114 WHERE ((T2114. C1000000001 =: 'SYS_B_0') AND (T2114. C536871442 =: 'SYS_B_1') AND (T2114. C536871477 =: 'SYS_B_2') AND ((: "SYS_B_3" - T2114.)) (C3) > =: 'SYS_B_4') AND ((: "SYS_B_5" - T2114.)) (C3) < =: 'SYS_B_6') AND (T2114. C1000000217 AS: 'SYS_B_7') AND (T2114. C536871478 <: 'SYS_B_8')) ORDER BY C1000000161 DESC,: 'SYS_B_9' ASC;

    He explained.

    SQL > SELECT * FROM TABLE (dbms_xplan.display);

    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Hash value of plan: 1497650422

    ----------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 6634. 524K | 2993 (19) | 00:00:01 |
    | 1. SORT ORDER BY | 6634. 524K | 2993 (19) | 00:00:01 |
    | 2. TABLE ACCESS BY INDEX ROWID | T2210 | 6634. 524K | 2947 (17) | 00:00:01 |
    |* 3 | INDEX RANGE SCAN | T2210_T | 6842. 108 (22) | 00:00:01 |
    ----------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    3 - access("T2210".") C490008000 ' =: SYS_B_0 AND "T2210".» C490009100 ' =: SYS_B_2.
    (AND "T2210". ' C301363300 '= TO_NUMBER (:SYS_B_1)).

    16 selected lines.

    In the future, please do not use * on object.
    Use the owner, object_type, object_name
    You avoid output unreadable in doing so.

    In the output that you show, you would need to know where the PUBLIC synonym points, by querying dba_synonyms or all_synonyms.
    If she SYS. Plan_table, you can drop ARADMIN. PLAN_TABLE.
    If there is no PLAN_TABLE SYS, you have to solve this problem.

    -----------
    Sybrand Bakker
    Senior Oracle DBA

  • File for a plan to explain html formatting.

    Hello

    I would like to create an html file formatting of an explain plan.
    Oracle 11.2.0.3 on Linux.

    I can't use DBMS_XPLAN. DISPLAY_PLAN because I get memory pointer information and and I can't put the statement_id.

    How can I do?

    user10931224 wrote:

    Hello

    I would like to create an html file formatting of an explain plan.
    Oracle 11.2.0.3 on Linux.

    I can't use DBMS_XPLAN. DISPLAY_PLAN because I get memory pointer information and and I can't put the statement_id.

    How can I do?

    SQL_ID lies within the AWR repository?

  • How to keep the formatting explain plan made on this forum

    Can you please tell me as a way to preserve the formatting of explain plan made on this forum. I tried to use the '-' tag, but failed.

    \

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------

    Hash value of plan: 615168685

    ---------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    ---------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |      |    23.  1242.     7 (15) | 00:00:01 |

    |*  1 |  HASH JOIN |      |    23.  1242.     7 (15) | 00:00:01 |

    |   2.   TABLE ACCESS FULL | DEPT |    13.   234.     3 (0) | 00:00:01 |

    |   3.   TABLE ACCESS FULL | EMP |    23.   828 |     3 (0) | 00:00:01 |

    ---------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - access("E".") DEPTNO "=" D ". ("' DEPTNO ')

    15 selected lines.

    \

    Go to advanced editor and change the font to a fixed-width font e.g. Courier New

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------

    Hash value of plan: 615168685

    ---------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    ---------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |      |    23.  1242.     7 (15) | 00:00:01 |

    |*  1 |  HASH JOIN |      |    23.  1242.     7 (15) | 00:00:01 |

    |   2.   TABLE ACCESS FULL | DEPT |    13.   234.     3 (0) | 00:00:01 |

    |   3.   TABLE ACCESS FULL | EMP |    23.   828 |     3 (0) | 00:00:01 |

    ---------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - access("E".") DEPTNO "=" D ". ("' DEPTNO ')

    15 selected lines.

  • PLAN to EXPLAIN verbose output when you ask explain simple plan on SQL

    Hello. In short, I have two questions: first, inability to run EXPLAIN PLAN via SET AUTOTRACE ON EXPLAIN and second, extremely detailed output when I connect as SYSDBA to bypass the first issue.

    Thus, question number one:
    I am trying to obtain an EXPLAIN PLAN via SET AUTOTRACE ON EXPLAIN to a simple SQL query:
      1   select decode(rownum,1,'JAN', 2,'FEB',3,'MAR',4,'APR',5,'MAY',6,'JUN',7,'JUL',8,'AUG',9,'SEP',10,'OCT',11,'NOV',12,'DEC')
      2* from all_objects where rownum<13
    HR@XE> /
    
    DEC
    ---
    JAN
    FEB
    MAR
    APR
    MAY
    JUN
    JUL
    AUG
    SEP
    OCT
    NOV
    DEC
    
    12 rows selected.
    
    HR@XE> set autotrace on explain
    HR@XE> /
    
    DEC
    ---
    JAN
    FEB
    MAR
    APR
    MAY
    JUN
    JUL
    AUG
    SEP
    OCT
    NOV
    DEC
    
    12 rows selected.
    
    
    Execution Plan
    ----------------------------------------------------------
    ERROR:
    ORA-01039: insufficient privileges on underlying objects of the view
    So, first question, why I get this error? Object should be available to everyone, right?

    To work around this I connect as sysdba and get the second issue: the following extremely detailed output
    HR@XE> connect / as sysdba
    Connected.
    SYS@XE>  select decode(rownum,1,'JAN', 2,'FEB',3,'MAR',4,'APR',5,'MAY',6,'JUN',7,'JUL',8,'AUG',9,'SEP',10,'OCT',11,'NOV',12,'DEC')
      2  from all_objects where rownum<13;
    
    DEC
    ---
    JAN
    FEB
    MAR
    APR
    MAY
    JUN
    JUL
    AUG
    SEP
    OCT
    NOV
    DEC
    
    12 rows selected.
    
    SYS@XE> set autotrace on explain
    SYS@XE> /
    
    DEC
    ---
    JAN
    FEB
    MAR
    APR
    MAY
    JUN
    JUL
    AUG
    SEP
    OCT
    NOV
    DEC
    
    12 rows selected.
    
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1291336664
    
    --------------------------------------------------------------------------------------------------------------
    | Id  | Operation                          | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                   |                         |    12 |  3240 |     5  (20)| 00:00:01 |
    |*  1 |  COUNT STOPKEY                     |                         |       |       |            |       |
    |*  2 |   FILTER                           |                         |       |       |            |       |
    |*  3 |    HASH JOIN                       |                         |    32 |  8640 |     5  (20)| 00:00:01 |
    |   4 |     INDEX FULL SCAN                | I_USER2                 |    49 |  1078 |     1   (0)| 00:00:01 |
    |*  5 |     HASH JOIN                      |                         |    32 |  5248 |     4  (25)| 00:00:01 |
    |   6 |      INDEX FULL SCAN               | I_USER2                 |    49 |   196 |     1   (0)| 00:00:01 |
    |*  7 |      TABLE ACCESS FULL             | OBJ$                    |    33 |  2640 |     2   (0)| 00:00:01 |
    |*  8 |    TABLE ACCESS BY INDEX ROWID     | IND$                    |     1 |     8 |     2   (0)| 00:00:01 |
    |*  9 |     INDEX UNIQUE SCAN              | I_IND1                  |     1 |       |     1   (0)| 00:00:01 |
    |* 10 |    HASH JOIN                       |                         |     1 |    24 |     3  (34)| 00:00:01 |
    |* 11 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |    11 |     2   (0)| 00:00:01 |
    |  12 |     FIXED TABLE FULL               | X$KZSRO                 |   100 |  1300 |     0   (0)| 00:00:01 |
    |* 13 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 14 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  15 |    NESTED LOOPS                    |                         |       |       |            |       |
    |  16 |     NESTED LOOPS                   |                         |     1 |    73 |     6   (0)| 00:00:01 |
    |  17 |      NESTED LOOPS                  |                         |     1 |    63 |     4   (0)| 00:00:01 |
    |  18 |       NESTED LOOPS                 |                         |     1 |    52 |     3   (0)| 00:00:01 |
    |  19 |        MERGE JOIN CARTESIAN        |                         |     1 |    48 |     2   (0)| 00:00:01 |
    |* 20 |         INDEX RANGE SCAN           | I_OBJ5                  |     1 |    35 |     2   (0)| 00:00:01 |
    |  21 |         BUFFER SORT                |                         |   100 |  1300 |     0   (0)| 00:00:01 |
    |  22 |          FIXED TABLE FULL          | X$KZSRO                 |   100 |  1300 |     0   (0)| 00:00:01 |
    |* 23 |        INDEX RANGE SCAN            | I_USER2                 |     1 |     4 |     1   (0)| 00:00:01 |
    |* 24 |       INDEX RANGE SCAN             | I_OBJAUTH1              |     1 |    11 |     1   (0)| 00:00:01 |
    |* 25 |      INDEX RANGE SCAN              | I_DEPENDENCY1           |     4 |       |     1   (0)| 00:00:01 |
    |* 26 |     TABLE ACCESS BY INDEX ROWID    | DEPENDENCY$             |     1 |    10 |     2   (0)| 00:00:01 |
    |* 27 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 28 |    HASH JOIN                       |                         |     1 |    24 |     3  (34)| 00:00:01 |
    |* 29 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |    11 |     2   (0)| 00:00:01 |
    |  30 |     FIXED TABLE FULL               | X$KZSRO                 |   100 |  1300 |     0   (0)| 00:00:01 |
    |* 31 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  32 |    NESTED LOOPS                    |                         |     2 |    48 |     2   (0)| 00:00:01 |
    |* 33 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |    11 |     2   (0)| 00:00:01 |
    |* 34 |     FIXED TABLE FULL               | X$KZSRO                 |     2 |    26 |     0   (0)| 00:00:01 |
    |  35 |    NESTED LOOPS                    |                         |     1 |    38 |     2   (0)| 00:00:01 |
    |  36 |     NESTED LOOPS                   |                         |     1 |    25 |     2   (0)| 00:00:01 |
    |* 37 |      TABLE ACCESS BY INDEX ROWID   | TRIGGER$                |     1 |    14 |     1   (0)| 00:00:01 |
    |* 38 |       INDEX UNIQUE SCAN            | I_TRIGGER2              |     1 |       |     0   (0)| 00:00:01 |
    |* 39 |      INDEX RANGE SCAN              | I_OBJAUTH1              |     1 |    11 |     1   (0)| 00:00:01 |
    |* 40 |     FIXED TABLE FULL               | X$KZSRO                 |     1 |    13 |     0   (0)| 00:00:01 |
    |* 41 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  42 |    NESTED LOOPS                    |                         |       |       |            |       |
    |  43 |     NESTED LOOPS                   |                         |     1 |    73 |     6   (0)| 00:00:01 |
    |  44 |      NESTED LOOPS                  |                         |     1 |    63 |     4   (0)| 00:00:01 |
    |  45 |       NESTED LOOPS                 |                         |     1 |    52 |     3   (0)| 00:00:01 |
    |  46 |        MERGE JOIN CARTESIAN        |                         |     1 |    48 |     2   (0)| 00:00:01 |
    |* 47 |         INDEX RANGE SCAN           | I_OBJ5                  |     1 |    35 |     2   (0)| 00:00:01 |
    |  48 |         BUFFER SORT                |                         |   100 |  1300 |     0   (0)| 00:00:01 |
    |  49 |          FIXED TABLE FULL          | X$KZSRO                 |   100 |  1300 |     0   (0)| 00:00:01 |
    |* 50 |        INDEX RANGE SCAN            | I_USER2                 |     1 |     4 |     1   (0)| 00:00:01 |
    |* 51 |       INDEX RANGE SCAN             | I_OBJAUTH1              |     1 |    11 |     1   (0)| 00:00:01 |
    |* 52 |      INDEX RANGE SCAN              | I_DEPENDENCY1           |     4 |       |     1   (0)| 00:00:01 |
    |* 53 |     TABLE ACCESS BY INDEX ROWID    | DEPENDENCY$             |     1 |    10 |     2   (0)| 00:00:01 |
    |* 54 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 55 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 56 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  57 |    NESTED LOOPS                    |                         |     2 |    68 |     2   (0)| 00:00:01 |
    |  58 |     NESTED LOOPS                   |                         |     1 |    21 |     2   (0)| 00:00:01 |
    |  59 |      TABLE ACCESS BY INDEX ROWID   | TABPART$                |     1 |    10 |     1   (0)| 00:00:01 |
    |* 60 |       INDEX UNIQUE SCAN            | I_TABPART_OBJ$          |     1 |       |     0   (0)| 00:00:01 |
    |* 61 |      INDEX RANGE SCAN              | I_OBJAUTH1              |     1 |    11 |     1   (0)| 00:00:01 |
    |* 62 |     FIXED TABLE FULL               | X$KZSRO                 |     2 |    26 |     0   (0)| 00:00:01 |
    |* 63 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 64 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 65 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 66 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 67 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 68 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 69 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 70 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 71 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 72 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 73 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 74 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  75 |    VIEW                            |                         |     1 |    13 |     2   (0)| 00:00:01 |
    |  76 |     FAST DUAL                      |                         |     1 |       |     2   (0)| 00:00:01 |
    |* 77 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 78 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 79 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 80 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 81 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 82 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  83 |    NESTED LOOPS                    |                         |     2 |    42 |     2   (0)| 00:00:01 |
    |* 84 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |     8 |     2   (0)| 00:00:01 |
    |* 85 |     FIXED TABLE FULL               | X$KZSRO                 |     2 |    26 |     0   (0)| 00:00:01 |
    |* 86 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  87 |    NESTED LOOPS                    |                         |     2 |    42 |     2   (0)| 00:00:01 |
    |* 88 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |     8 |     2   (0)| 00:00:01 |
    |* 89 |     FIXED TABLE FULL               | X$KZSRO                 |     2 |    26 |     0   (0)| 00:00:01 |
    |* 90 |      FIXED TABLE FULL              | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  91 |    VIEW                            |                         |     1 |    16 |     1   (0)| 00:00:01 |
    |  92 |     SORT GROUP BY                  |                         |     1 |    86 |     1   (0)| 00:00:01 |
    |  93 |      NESTED LOOPS                  |                         |     1 |    86 |     1   (0)| 00:00:01 |
    |  94 |       MERGE JOIN CARTESIAN         |                         |     1 |    78 |     0   (0)| 00:00:01 |
    |  95 |        NESTED LOOPS                |                         |     1 |    65 |     0   (0)| 00:00:01 |
    |* 96 |         INDEX UNIQUE SCAN          | I_OLAP_CUBES$           |     1 |    13 |     0   (0)| 00:00:01 |
    |* 97 |         TABLE ACCESS BY INDEX ROWID| OLAP_DIMENSIONALITY$    |     1 |    52 |     0   (0)| 00:00:01 |
    |* 98 |          INDEX RANGE SCAN          | I_OLAP_DIMENSIONALITY$  |     1 |       |     0   (0)| 00:00:01 |
    |  99 |        BUFFER SORT                 |                         |     1 |    13 |     0   (0)| 00:00:01 |
    | 100 |         INDEX FULL SCAN            | I_OLAP_CUBE_DIMENSIONS$ |     1 |    13 |     0   (0)| 00:00:01 |
    |*101 |       INDEX RANGE SCAN             | I_OBJ1                  |     1 |     8 |     1   (0)| 00:00:01 |
    | 102 |    NESTED LOOPS                    |                         |     1 |    30 |     2   (0)| 00:00:01 |
    |*103 |     INDEX SKIP SCAN                | I_USER2                 |     1 |    20 |     1   (0)| 00:00:01 |
    |*104 |     INDEX RANGE SCAN               | I_OBJ4                  |     1 |    10 |     1   (0)| 00:00:01 |
    --------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(ROWNUM<13)
       2 - filter(("O"."TYPE#"<>1 AND "O"."TYPE#"<>10 OR "O"."TYPE#"=1 AND  (SELECT 1 FROM "SYS"."IND$"
                  "I" WHERE "I"."OBJ#"=:B1 AND ("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR
                  "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR "I"."TYPE#"=9))=1) AND (("O"."SPARE3"=USERENV('SCHEMAID') OR
                  "O"."SPARE3"=1) OR "O"."TYPE#"=13 AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$" "OA",SYS."X$KZSRO"
                  "X$KZSRO" WHERE "OA"."GRANTEE#"="KZSROROL" AND "OA"."OBJ#"=:B2 AND ("OA"."PRIVILEGE#"=12 OR
                  "OA"."PRIVILEGE#"=26)) OR  EXISTS (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE
                  "INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-184) OR (-"KZSPRPRV")=(-181) OR
                  (-"KZSPRPRV")=(-241)))) OR ("O"."TYPE#"=1 OR "O"."TYPE#"=2 OR "O"."TYPE#"=3 OR "O"."TYPE#"=4 OR
                  "O"."TYPE#"=5 OR "O"."TYPE#"=19 OR "O"."TYPE#"=20 OR "O"."TYPE#"=34 OR "O"."TYPE#"=35) AND  EXISTS
                  (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE "INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-45)
                  OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50))) OR
                  "O"."TYPE#"=11 AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$" "OA","SYS"."DEPENDENCY$"
                  "DEP",SYS."USER$" "U",SYS."OBJ$" "O",SYS."X$KZSRO" "X$KZSRO" WHERE "O"."NAME"=:B3 AND
                  "O"."SPARE3"=:B4 AND "O"."TYPE#"=9 AND "O"."TYPE#"<>88 AND "O"."OWNER#"="U"."USER#" AND
                  "DEP"."D_OBJ#"=:B5 AND "DEP"."P_OBJ#"="O"."OBJ#" AND "OA"."OBJ#"="O"."OBJ#" AND "OA"."PRIVILEGE#"=26
                  AND "OA"."GRANTEE#"="KZSROROL") OR  EXISTS (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE
                  ((-"KZSPRPRV")=(-141) OR (-"KZSPRPRV")=(-241)) AND "INST_ID"=USERENV('INSTANCE'))) OR ("O"."TYPE#"=7
                  OR "O"."TYPE#"=8 OR "O"."TYPE#"=9 OR "O"."TYPE#"=28 OR "O"."TYPE#"=29 OR "O"."TYPE#"=30 OR
                  "O"."TYPE#"=56) AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$" "OA",SYS."X$KZSRO" "X$KZSRO" WHERE
                  "OA"."GRANTEE#"="KZSROROL" AND "OA"."OBJ#"=:B6 AND ("OA"."PRIVILEGE#"=12 OR "OA"."PRIVILEGE#"=26)) OR
                   EXISTS (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE "INST_ID"=USERENV('INSTANCE') AND
                  ((-"KZSPRPRV")=(-144) OR (-"KZSPRPRV")=(-141) OR (-"KZSPRPRV")=(-241)))) OR "O"."TYPE#"<>14 AND
                  "O"."TYPE#"<>28 AND "O"."TYPE#"<>29 AND "O"."TYPE#"<>30 AND "O"."TYPE#"<>56 AND "O"."TYPE#"<>93 AND
                  "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND
                  "O"."TYPE#"<>13 AND  EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$" "OBJAUTH$",SYS."X$KZSRO" "X$KZSRO" WHERE
                  "GRANTEE#"="KZSROROL" AND "OBJ#"=:B7 AND ("PRIVILEGE#"=3 OR "PRIVILEGE#"=6 OR "PRIVILEGE#"=7 OR
                  "PRIVILEGE#"=9 OR "PRIVILEGE#"=10 OR "PRIVILEGE#"=11 OR "PRIVILEGE#"=12 OR "PRIVILEGE#"=16 OR
                  "PRIVILEGE#"=17 OR "PRIVILEGE#"=18)) OR "O"."TYPE#"=12 AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$"
                  "OA","SYS"."TRIGGER$" "T",SYS."X$KZSRO" "X$KZSRO" WHERE "OA"."GRANTEE#"="KZSROROL" AND "T"."OBJ#"=:B8
                  AND BITAND("T"."PROPERTY",24)=0 AND "OA"."OBJ#"="T"."BASEOBJECT" AND "OA"."PRIVILEGE#"=26) OR  EXISTS
                  (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE ((-"KZSPRPRV")=(-152) OR (-"KZSPRPRV")=(-241)) AND
                  "INST_ID"=USERENV('INSTANCE'))) OR "O"."TYPE#"=14 AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$"
                  "OA","SYS"."DEPENDENCY$" "DEP",SYS."USER$" "U",SYS."OBJ$" "O",SYS."X$KZSRO" "X$KZSRO" WHERE
                  "O"."NAME"=:B9 AND "O"."SPARE3"=:B10 AND "O"."TYPE#"=13 AND "O"."TYPE#"<>88 AND
                  "O"."OWNER#"="U"."USER#" AND "DEP"."D_OBJ#"=:B11 AND "DEP"."P_OBJ#"="O"."OBJ#" AND
                  "OA"."OBJ#"="O"."OBJ#" AND "OA"."PRIVILEGE#"=26 AND "OA"."GRANTEE#"="KZSROROL") OR  EXISTS (SELECT 0
                  FROM SYS."X$KZSPR" "X$KZSPR" WHERE ((-"KZSPRPRV")=(-181) OR (-"KZSPRPRV")=(-241)) AND
                  "INST_ID"=USERENV('INSTANCE'))) OR ("O"."TYPE#"=66 OR "O"."TYPE#"=100) AND  EXISTS (SELECT 0 FROM
                  SYS."X$KZSPR" "X$KZSPR" WHERE (-"KZSPRPRV")=(-265) AND "INST_ID"=USERENV('INSTANCE')) OR
                  ("O"."TYPE#"=67 OR "O"."TYPE#"=79) AND  EXISTS (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE
                  ((-"KZSPRPRV")=(-265) OR (-"KZSPRPRV")=(-266)) AND "INST_ID"=USERENV('INSTANCE')) OR "O"."TYPE#"=19
                  AND  EXISTS (SELECT 0 FROM SYS."TABPART$" "TABPART$","SYS"."OBJAUTH$" "OBJAUTH$",SYS."X$KZSRO"
                  "X$KZSRO" WHERE "GRANTEE#"="KZSROROL" AND "BO#"="OBJ#" A)
       3 - access("O"."OWNER#"="U"."USER#")
       5 - access("O"."SPARE3"="U"."USER#")
       7 - filter("O"."NAME"<>'_NEXT_OBJECT' AND "O"."NAME"<>'_default_auditing_options_' AND
                  BITAND("O"."FLAGS",128)=0 AND "O"."LINKNAME" IS NULL)
       8 - filter("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR
                  "I"."TYPE#"=7 OR "I"."TYPE#"=9)
       9 - access("I"."OBJ#"=:B1)
      10 - access("OA"."GRANTEE#"="KZSROROL")
      11 - access("OA"."OBJ#"=:B1)
           filter("OA"."PRIVILEGE#"=12 OR "OA"."PRIVILEGE#"=26)
      13 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-184) OR (-"KZSPRPRV")=(-181) OR
                  (-"KZSPRPRV")=(-241)))
      14 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR
                  (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50)))
      20 - access("O"."SPARE3"=:B1 AND "O"."NAME"=:B2 AND "O"."TYPE#"=9)
           filter("O"."TYPE#"=9 AND "O"."TYPE#"<>88)
      23 - access("O"."OWNER#"="U"."USER#")
      24 - access("OA"."OBJ#"="O"."OBJ#" AND "OA"."GRANTEE#"="KZSROROL" AND "OA"."PRIVILEGE#"=26)
           filter("OA"."PRIVILEGE#"=26 AND "OA"."GRANTEE#"="KZSROROL")
      25 - access("DEP"."D_OBJ#"=:B1)
      26 - filter("DEP"."P_OBJ#"="O"."OBJ#")
      27 - filter(((-"KZSPRPRV")=(-141) OR (-"KZSPRPRV")=(-241)) AND "INST_ID"=USERENV('INSTANCE'))
      28 - access("OA"."GRANTEE#"="KZSROROL")
      29 - access("OA"."OBJ#"=:B1)
           filter("OA"."PRIVILEGE#"=12 OR "OA"."PRIVILEGE#"=26)
      31 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-144) OR (-"KZSPRPRV")=(-141) OR
                  (-"KZSPRPRV")=(-241)))
      33 - access("OBJ#"=:B1)
           filter("PRIVILEGE#"=3 OR "PRIVILEGE#"=6 OR "PRIVILEGE#"=7 OR "PRIVILEGE#"=9 OR "PRIVILEGE#"=10
                  OR "PRIVILEGE#"=11 OR "PRIVILEGE#"=12 OR "PRIVILEGE#"=16 OR "PRIVILEGE#"=17 OR "PRIVILEGE#"=18)
      34 - filter("GRANTEE#"="KZSROROL")
      37 - filter(BITAND("T"."PROPERTY",24)=0)
      38 - access("T"."OBJ#"=:B1)
      39 - access("OA"."OBJ#"="T"."BASEOBJECT" AND "OA"."PRIVILEGE#"=26)
           filter("OA"."PRIVILEGE#"=26)
      40 - filter("OA"."GRANTEE#"="KZSROROL")
      41 - filter(((-"KZSPRPRV")=(-152) OR (-"KZSPRPRV")=(-241)) AND "INST_ID"=USERENV('INSTANCE'))
      47 - access("O"."SPARE3"=:B1 AND "O"."NAME"=:B2 AND "O"."TYPE#"=13)
           filter("O"."TYPE#"=13 AND "O"."TYPE#"<>88)
      50 - access("O"."OWNER#"="U"."USER#")
      51 - access("OA"."OBJ#"="O"."OBJ#" AND "OA"."GRANTEE#"="KZSROROL" AND "OA"."PRIVILEGE#"=26)
           filter("OA"."PRIVILEGE#"=26 AND "OA"."GRANTEE#"="KZSROROL")
      52 - access("DEP"."D_OBJ#"=:B1)
      53 - filter("DEP"."P_OBJ#"="O"."OBJ#")
      54 - filter(((-"KZSPRPRV")=(-181) OR (-"KZSPRPRV")=(-241)) AND "INST_ID"=USERENV('INSTANCE'))
      55 - filter((-"KZSPRPRV")=(-265) AND "INST_ID"=USERENV('INSTANCE'))
      56 - filter(((-"KZSPRPRV")=(-265) OR (-"KZSPRPRV")=(-266)) AND "INST_ID"=USERENV('INSTANCE'))
      60 - access("OBJ#"=:B1)
      61 - access("BO#"="OBJ#" AND "PRIVILEGE#"=9)
           filter("PRIVILEGE#"=9)
      62 - filter("GRANTEE#"="KZSROROL")
      63 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-189) OR (-"KZSPRPRV")=(-190) OR
                  (-"KZSPRPRV")=(-191) OR (-"KZSPRPRV")=(-192)))
      64 - filter((-"KZSPRPRV")=(-109) AND "INST_ID"=USERENV('INSTANCE'))
      65 - filter(((-"KZSPRPRV")=(-177) OR (-"KZSPRPRV")=(-178)) AND "INST_ID"=USERENV('INSTANCE'))
      66 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR
                  (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50)))
      67 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-205) OR (-"KZSPRPRV")=(-206) OR
                  (-"KZSPRPRV")=(-207) OR (-"KZSPRPRV")=(-208)))
      68 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-200) OR (-"KZSPRPRV")=(-201) OR
                  (-"KZSPRPRV")=(-202) OR (-"KZSPRPRV")=(-203) OR (-"KZSPRPRV")=(-204)))
      69 - filter(((-"KZSPRPRV")=(-222) OR (-"KZSPRPRV")=(-223)) AND "INST_ID"=USERENV('INSTANCE'))
      70 - filter((-"KZSPRPRV")=12 AND "INST_ID"=USERENV('INSTANCE'))
      71 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-251) OR (-"KZSPRPRV")=(-252) OR
                  (-"KZSPRPRV")=(-253) OR (-"KZSPRPRV")=(-254)))
      72 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-258) OR (-"KZSPRPRV")=(-259) OR
                  (-"KZSPRPRV")=(-260) OR (-"KZSPRPRV")=(-261)))
      73 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-246) OR (-"KZSPRPRV")=(-247) OR
                  (-"KZSPRPRV")=(-248) OR (-"KZSPRPRV")=(-249)))
      74 - filter(((-"KZSPRPRV")=(-268) OR (-"KZSPRPRV")=(-267)) AND "INST_ID"=USERENV('INSTANCE'))
      77 - filter(((-"KZSPRPRV")=(-277) OR (-"KZSPRPRV")=(-278)) AND "INST_ID"=USERENV('INSTANCE'))
      78 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-292) OR (-"KZSPRPRV")=(-293) OR
                  (-"KZSPRPRV")=(-294)))
      79 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-282) OR (-"KZSPRPRV")=(-283) OR
                  (-"KZSPRPRV")=(-284) OR (-"KZSPRPRV")=(-285)))
      80 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-302) OR (-"KZSPRPRV")=(-303) OR
                  (-"KZSPRPRV")=(-304) OR (-"KZSPRPRV")=(-305) OR (-"KZSPRPRV")=(-306) OR (-"KZSPRPRV")=(-307)))
      81 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-315) OR (-"KZSPRPRV")=(-316) OR
                  (-"KZSPRPRV")=(-317) OR (-"KZSPRPRV")=(-318)))
      82 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-320) OR (-"KZSPRPRV")=(-321) OR
                  (-"KZSPRPRV")=(-322)))
      84 - access("OBJ#"=:B1)
      85 - filter("GRANTEE#"="KZSROROL")
      86 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-309) OR (-"KZSPRPRV")=(-310) OR
                  (-"KZSPRPRV")=(-311) OR (-"KZSPRPRV")=(-312) OR (-"KZSPRPRV")=(-313)))
      88 - access("OBJ#"=:B1)
      89 - filter("GRANTEE#"="KZSROROL")
      90 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-302) OR (-"KZSPRPRV")=(-303) OR
                  (-"KZSPRPRV")=(-304) OR (-"KZSPRPRV")=(-305) OR (-"KZSPRPRV")=(-306) OR (-"KZSPRPRV")=(-307)))
      96 - access("C"."OBJ#"=:B1)
      97 - filter("DIML"."DIMENSION_TYPE"=11)
      98 - access("DIML"."DIMENSIONED_OBJECT_ID"=:B1 AND "DIML"."DIMENSIONED_OBJECT_TYPE"=1)
     101 - access("DIML"."DIMENSION_ID"="DO"."OBJ#")
           filter("DO"."OBJ#"="DIM"."OBJ#")
     103 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
           filter("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
     104 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
    
    SYS@XE>
    Thanks in advance.
    Jason

    Welcome to the forum!

    Every time you post please provide your Oracle Version 4-digit (result of SELECT * FROM V$ VERSION).
    >
    So, first question, why I get this error? Object should be available to everyone, right?
    >
    Your username may have access to object. But you must have dba privileges to access the objects of database views.

    The "ORA-01039: insufficient privileges on the underlying objects of the view" message tells you that the user has privileges to access the BASIC OBJECTS used to generate the view. Access to these basic objects is necessary to generate the plan you want to see. To work around this, I connect as sysdba and get the second question: the following extremely verbose output
    >
    And that's because sysdba has access to objects in the view database. You asked for a plan, and you guessed it. This verbose output IS the plan and all those that oddly named tables are presented in order to satisfy your request are included in the plan.

    Make your query using DUAL citizenship or SCOTT. Table EMP and you will not get the error.

  • Need help with understanding explain plan

    Hi all

    I'm trying to understand the subject of the explain Plan, and while I was reading a document and from there I found one of the query that is below:

    Query

    SELECT A.customer_name,

    Count (distinct b.invoice_id) 'open invoices. "

    Count (c.invoice_id) "open invoice".

    Clients has,

    b invoices,

    c invoices_items

    WHERE b.invoice_status = 'OPEN'

    AND A.customer_id = b.customer_id

    AND c.invoice_id (+) = b.invoice_id

    A.customer_name GROUP

    Explain Plan

    See attached file...

    explain_plan.JPG

    I appreciate if someone explain this attached plan really explain in detail for my purpose of learning. Thanks in advance

    Concerning

    Muzz

    I'm trying to understand the subject of the explain Plan

    Excellent!

    I suggest you just started reading the book of Maria Colgan white "Explain the explain Plan".

    http://www.Oracle.com/technetwork/database/bi-Datawarehousing/TWP-explain-the-explain-plan-052011-393674.PDF

    This white paper examines the different lines, you will see in a plan and what they mean.

  • Adding formatting to output a report to HTML format

    I'm in a respect which sends the output to HTML (thanks to LucD thereby).  I'm hoping to make three improvements:

    1 to see if it is possible to add two characters of the space between the columns so you can tell where one ends and the other begins

    2. add borders around each of the elements in the table

    3. in addition to sending the report as part of the actual body of the email, include an html file as an attachment to the email so

    Is this possible?  At the moment only the csv file is attached to the report.

    Thank you!

    $report = Get-VM | select name, numcpu, vmhost, memorygb, folder, guest

    $reportHtml = $report | ConvertTo-Html | Out-String
    $report | Export-Csv report.csv NoTypeInformation - -UseCulture

    Send-MailMessage -In mymail@mycompany.com -subject report '
    -SmtpServer smtp.mycompany.com -of [email protected]'
    -BodyAsHtml -body $reportHtml -Accessories report.csv

    Hello, TheVMinator-

    As LucD says (of course), ConvertTo-Html allows such things.  I was away by making an example of this when Luc replied, but I went to a finish to the top to provide such example.  Something like:

    $report = Get-VM | select name, numcpu, vmhost, memorygb, folder, guest
    
    ## define some style for the HTML$strHtmlHead = "My Report"## use the style in the ConvertTo-Html call$reportHtml = $report | ConvertTo-Html -Head $strHtmlHead## write out the CSV$report | Export-Csv report.csv -NoTypeInformation -UseCulture## write out the HTML$reportHtml | Out-File -Encoding ASCII -FilePath myreport.htm
    
    ## send the mail message, with HTML body and a couple of attachmentsSend-MailMessage -To [email protected] -Subject Report `  -SmtpServer smtp.mycompany.com -From [email protected]`  -BodyAsHtml -Body $reportHtml -Attachments report.csv,myreport.htm
    

    This makes some minor CSS in the HEAD of HTML to manage points 1 and 2 for you.  And, by adding a call Out-File name of the file that results in the table of values for the - Send-MailMessage setting accessories, the HTML file must also be attached to the e-mail message.  What to do for you?

  • Explain the explain plan

    decide to move to optimization soon. Book says join faster that the subquery in this example because the analyses involved. The "cost" to the subquery appears lower than the cost for the join. So it is confusing to me - aka How should I be interpreting this.

    Plan of subquery:

    image2.png.jpg

    join plan

    image2.png.jpg

    as you can see that the plan for the subquery has less than a cost. Could someone explain these outputs as to which application is more effective. I need to start somewhere.

    Thank you!

    The BEST way to get help when you ask questions is:

    1 ask questions on SPECIFIC things

    2. tell us EXACTLY what term, value, etc. ask abaout

    Book says join faster that the subquery in this example because the analyses involved. The "cost" to the subquery appears lower than the cost for the join. So it is confusing to me - aka How should I be interpreting this.

    OK - what BOOK are you talking about? There is not much interest to mention a book if you're not going to tell us which book it and provide a link to it and even a page number. This gives us the SCOPE of your question.

    This "cost for the subquery" are you talking about? Be specifc. It is in one of the plans that you posted? What plan? Whose cost is it? For example, you could say:

    I have a question for the foreground below. Why is the cost to the xx line lower than the cost of the second plan on line AA?

    This question refers CLEARLY to the info we're talking. The way in which you stating the question, we try to guess what plan and the lines you want to say.

    subquery plan:
    
    
    join plan
    
    
    as you can see the subquery plan has less of a cost. Could someone explain from these outputs as to which query is more efficient. I need to start from somewhere.
    

    Are you talking about line #1 in each of these plans?

    Please edit your post and tell us EXACTLY what you ask in the topic and refer to values and SPECIFIC lines. Also post a link to the book and a reference to a page number you got the information from.

    The optimizer generally chooses the REAL implementation with the lowest cost plan. It is not clear whether the plans that you have posted are ACTUAL spending plans that Oracle really determined and used or just explain plans.for what Oracle thought it might use.

    If the statistics are not up-to-date these plans do not yet reflect the reality of the data.

    And if the amount of data is a small number of blocks or other of these plans can run better than the other in reality.

    You can find this Oracle white paper "Explain the Plan explaining" useful

    http://www.Oracle.com/technetwork/database/bi-Datawarehousing/TWP-explain-the-explain-plan-052011-393674.PDF

  • explain plan for the same query diff

    Hi experts,

    Please, help me understand explain the plan.  I have tow Server (server and two server). The server are same table, even the type of database, even version Oracle (gr 11 (2), same operating system (linux Redhat 5.5) and same table and index.

    but when I explain the plan for the same query on the two server. I got diff--diff to explain the plan. reason it has different, according to my understanding, it should be same. explain please, I share the explain plan and lower indices for the two server.

    Server a

    SQL > col COLUMN_NAME format a20

    SQL > select index_name, column_name, position_colonne from user_ind_columns where table_name = 'LOAN_RUNNING_DETAILS_SOUTH"of order 1.

    INDEX_NAME COLUMN_NAME POSITION_COLONNE

    ------------------------------ -------------------- ---------------

    DATE_IND1_S LOANDATETIME 1

    IND_MSI_LN_LNS1_S MSISDN 1

    IND_MSI_LN_LNS1_S LOANDATETIME 2

    IND_MSI_LN_LNS1_S LOANSTATUS 3

    LAST_INDEX L_INDX_MSISDN_S 1

    MSISDN L_INDX_MSISDN_S 2

    SQL > select decode (status, 'N/a', 'Part Hdr', 'Global') ind_type, index_name, NULL nom_partition, status

    2 from user_indexes where table_name = 'LOAN_RUNNING_DETAILS_SOUTH '.

    3 union

    4. Select 'Local' ind_type, index_name, nom_partition, status

    5 to user_ind_partitions where index-name in (select index_name in user_indexes where table_name = 'LOAN_RUNNING_DETAILS_SOUTH')

    6 order of 1,2,3;

    IND_TYPE INDEX_NAME NOM_PARTITION STATUS

    -------- ------------------------------ ------------------------------ --------

    Global DATE_IND1_S VALID

    Global IND_MSI_LN_LNS1_S VALID

    Global L_INDX_MSISDN_S VALID

    SQL > explain plan for the small circle of MSISDN, TID, of LOAN_RUNNING_DETAILS_SOUTH where LOANDATETIME < = sysdate-2 and LOANDATETIME > sysdate-15 and LOANTYPE = 1;

    He explained.

    SQL > SQL > set line 200

    @?/rdbms/admin/utlxpls.sql

    SQL >

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Hash value of plan: 3659874059

    ------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                       | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

    ------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                            |  1448K |    58 M | 21973 (2) | 00:04:24 |       |       |

    |*  1 |  FILTER |                            |       |       |            |          |       |       |

    |   2.   PARTITION LIST ALL |                            |  1448K |    58 M | 21973 (2) | 00:04:24 |     1.    11.

    |*  3 |    TABLE ACCESS FULL | LOAN_RUNNING_DETAILS_SOUTH |  1448K |    58 M | 21973 (2) | 00:04:24 |     1.    11.

    ------------------------------------------------------------------------------------------------------------------

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - filter(SYSDATE@!-2>SYSDATE@!-15)

    3 - filter("LOANTYPE"=1 AND "LOANDATETIME">SYSDATE@!-15 AND "LOANDATETIME"<=SYSDATE@!-2)

    16 selected lines.

    Second server

    SQL > select index_name, column_name, position_colonne from user_ind_columns where table_name = 'LOAN_RUNNING_DETAILS_SOUTH"of order 1.

    INDEX_NAME COLUMN_NAME POSITION_COLONNE

    ------------------------------ -------------------- ---------------

    DATE_IND1_S LOANDATETIME 1

    IND_MSI_LN_LNS1_S MSISDN 1

    IND_MSI_LN_LNS1_S LOANDATETIME 2

    IND_MSI_LN_LNS1_S LOANSTATUS 3

    LAST_INDEX L_INDX_MSISDN_S 1

    MSISDN L_INDX_MSISDN_S 2

    SQL > select decode (status, 'N/a', 'Part Hdr', 'Global') ind_type, index_name, NULL nom_partition, status

    2 from user_indexes where table_name = 'LOAN_RUNNING_DETAILS_SOUTH '.

    Union

    3 4 Select 'Local' ind_type, index_name, nom_partition, status

    5 to user_ind_partitions where index-name in (select index_name in user_indexes where table_name = 'LOAN_RUNNING_DETAILS_SOUTH')

    6 order of 1,2,3;

    IND_TYPE INDEX_NAME NOM_PARTITION STATUS

    -------- ------------------------------ ------------------------------ --------

    Global DATE_IND1_S VALID

    Global IND_MSI_LN_LNS1_S VALID

    Global L_INDX_MSISDN_S VALID

    SQL > explain plan for the small circle of MSISDN, TID, of LOAN_RUNNING_DETAILS_SOUTH where LOANDATETIME < = sysdate-2 and LOANDATETIME > sysdate-15 and LOANTYPE = 1;

    SQL > set line 200

    @?/rdbms/admin/utlxpls.sql

    SQL >

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Hash value of plan: 1161680601

    ----------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                       | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

    ----------------------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                            |     2.    84.     5 (0) | 00:00:01 |       |       |

    |*  1 |  FILTER                             |                            |       |       |            |          |       |       |

    |*  2 |   TABLE ACCESS BY INDEX ROWID | LOAN_RUNNING_DETAILS_SOUTH |     2.    84.     5 (0) | 00:00:01 | ROWID | ROWID |

    |*  3 |    INDEX RANGE SCAN | DATE_IND1_S |     2.       |     3 (0) | 00:00:01 |       |       |

    ----------------------------------------------------------------------------------------------------------------------------------

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - filter(SYSDATE@!-2>SYSDATE@!-15)

    2 - filter ("LOANTYPE" = 1)

    3 - access("LOANDATETIME">SYSDATE@!-15 AND "LOANDATETIME"<=SYSDATE@!-2)

    17 selected lines.

    Reg,

    Hard

    Hi , HemantKChitale,

    I also update statistics manual as you say, but not see 'TABLE ACCESS FULL' good result

    What should I do? my need of production tuning, but I cannot able tune this...

    SQL > exec dbms_stats.gather_table_stats (-online 'ttt' ownname, tabname => 'LOAN_RUNNING_DETAILS_SOUTH', cascade => TRUE, estimate_percent => NULL, method_opt => 'for all columns size 254', => of degree 4);

    PL/SQL procedure successfully completed.

    SQL > explain plan for the small circle of MSISDN, TID, of LOAN_RUNNING_DETAILS_SOUTH where LOANDATETIME<=sysdate-2 and="" loandatetime="">sysdate-15 and LOANTYPE = 1;

    He explained.

    SQL > set line 200

    @?/rdbms/admin/utlxpls.sql

    SQL >

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Hash value of plan: 3659874059

    ------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                       | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

    ------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                            |  1874K |    75 M | 19626 (2) | 00:03:56 |       |       |

    |*  1 |  FILTER |                            |       |       |            |          |       |       |

    |   2.   PARTITION LIST ALL |                            |  1874K |    75 M | 19626 (2) | 00:03:56 |     1.    11.

    |*  3 |    TABLE ACCESS FULL | LOAN_RUNNING_DETAILS_SOUTH |  1874K |    75 M | 19626 (2) | 00:03:56 |     1.    11.

    ------------------------------------------------------------------------------------------------------------------

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - filter(SYSDATE@!-2>SYSDATE@!-15)

    3 - filter("LOANDATETIME">SYSDATE@!-15 AND "LOANTYPE"=1 AND "LOANDATETIME")<>

    16 selected lines.

  • Convert a fragment of ADF page in HTML format

    using ADF 12 c

    Is it possible to convert my ADF page fragment which is a jsff page to an HTML page running?

    for example, I abc.jsff and a button "convert" on it, when you click on it that I need to convert the content of the page whole abc.html

    What I intend is, therefore, to convert the first page of the ADF in HTML format and then use the HTML code as the input to PD4ML.

    Maybe it would work for simple html pages, but not for pages with heavy use of javascript (as in the ADF).

    Instead, you can use a java pdf library (such as iText) or reporting (such as reports of jasper) engine to create PDFs of your data.

    Dario

  • Understanding explain plan

    Hi gurus

    I try to explain the plan and referring to the link that http://docs.oracle.com/database/121/TGSQL/tgsql_interp.htm#TGSQL277understand/learn, see below for more details:

    1st step

    EXPLAIN PLAN

    SET statement_id = "ex_plan1" FOR

    SELECT phone_number

    Employees

    WHERE phone_number AS 650% ';

    step 2

    SELECT PLAN_TABLE_OUTPUT

    TABLE (DBMS_XPLAN. DISPLAY (NULL, 'ex_plan1', 'BASIC'));

    Output

    PLAN_TABLE_OUTPUT

    Hash value of plan: 1445457117

    ---------------------------------------

    | ID | Operation | Name |

    ---------------------------------------

    |   0 | SELECT STATEMENT |           |

    |   1.  TABLE ACCESS FULL | EMPLOYEES |

    ---------------------------------------

    If you have watched the plan explained above then in operation, he leads shows TABLE ACCESS FULL.

    Let's see now another for we explain with other data, see below

    Step 3

    EXPLAIN PLAN

    SET statement_id = "ex_plan2" FOR

    SELECT last_name

    Employees

    WHERE name LIKE '% Pe;

    Step 4

    SELECT PLAN_TABLE_OUTPUT

    TABLE (DBMS_XPLAN. DISPLAY (NULL, 'ex_plan2', 'BASIC'));

    Output

    PLAN_TABLE_OUTPUT

    Hash value of plan: 3085132068

    ----------------------------------------

    | ID | Operation | Name |

    ----------------------------------------

    |   0 | SELECT STATEMENT |             |

    |   1.  INDEX RANGE SCAN | EMP_NAME_IX |

    ----------------------------------------

    First Question:
    When I run the sql below:

    SELECT phone_number

    Employees

    WHERE phone_number AS 650% ';

    so why does it display FULL TABLE ACCESS

    on the other hand, when I have executed under SQL:

    SELECT last_name

    Employees

    WHERE name LIKE '% Pe;

    so why it shows INDEX RANGE SCAN even the two queries by using like operator.

    2nd question

    In step 4 in the section operation, what is the meaning of the INDEX RANGE SCAN?

    3rd issue

    In step 4, under the name of topic, what is the meaning of EMP_NAME_IX?

    Thanks in advance

    Concerning

    Shu


    All this would be in the documentation.

    The second query uses a different plan because there was a clue on last_name.

    Index range scan is exactly what it sounds like - it scans the index to find the appropriate values

    emp_name_ix is the name of the index that it scans.

  • Look at an explain plan

    version 11.2.0.4.0

    Solaris x 64 operating system

    Toad 9.0

    Hi, I'm trying to give a new user privleges see explain the plan. for this, I did the following

    grant select_catalog_role < username >;

    Grant execute on sys.dbms_xplan_type < username >;

    Grant execute on sys.dbms_xplan_type_table < username >;

    It didn't work, and then I have granted the select privilege on the table of existing plan to a new user.

    Grant select on sys.plan_table < username >;

    create synonym plan_table for sys.plan_table

    Yet it did not work, I got the error "ORA-01031: insufficient privileges" when you try to view explain plan.

    I even tried to create a new table of plan in this new scheme of the user by running the utlxplan.sql, but I get an error message saying that the table already exists.

    can someone help me please on where I'm wrong.

    Thank you

    «The question one EXPLAIN PLAN statement, you must have the necessary privileges to insert rows into a table of existing output that you specify to hold execution plan.»

    You must also have the necessary privileges to run the SQL statement to determine the execution plan. If the SQL statement accesses a view, you must have privileges to access any tables and views on which the opinion is based. If the view is of another opinion which is based on a table, you must have privileges to access the other point of view and its underlying table.

    To examine the execution plan produced by a EXPLAIN PLAN statement, you must have the necessary privileges to query the table of output.

    The EXPLAIN PLAN statement is a statement data manipulation language (DML), rather than a data definition language (DDL) statement. Therefore, Oracle database does not implicitly commit changes made by one EXPLAIN PLAN statement. If you want to keep the lines that are generated by a EXPLAIN PLAN in the output table, then you must commit to the transaction that contains the statement. »

    http://docs.Oracle.com/CD/E16655_01/server.121/e17209/statements_9010.htm#sthref6316

Maybe you are looking for

  • Spectrum Analyzer (Keysight PXA) get the Trace using the binary format

    The ASCII format uses drivers. I need binary format. Number of points and many traces. This topic in several positions, but do not give a good answer. I have attaced my code. Visa to read data from binary block. VI has been lifted to another post, bu

  • BlackBerry smartphones take screenshot?

    Hi all... How to take screenshot on Blackberry Curve 9220 (OS 7.1)?

  • need new HD n5340

    My (old) laptop HD develops errors which do not meet the command chkdsk repairs very well. I would change out. It is only 20 GB, but an exact replacement, last time I looked, was too much. (This pc isn't worth much more). Is there any type of generic

  • Credentials file used by another process

    HelloI use a query script powercli VMs as soon as they are provided, but if two virtual machines are built in quick succession, that it can cause a conflict with the file of credentials of script that I use. The relevant section of the script is:$cre

  • Documents are not printed

    I have an Officejet L7590, when you print a document, print 3 lines.  %! PS-Adobe - 3.0% apl_DSC_Encoding: utf8 and % aplproducerversion 10.6.2 Bbuild10c540) and a bunch of blank white paper.  How can I solve this problem?   Help