Can users see the query plan of a SQL query in Oracle?

Hi,
I wonder for a given sql query, after the system optimization, can I see the query plan in oracle? If yes, how to do that? thank you.
Xing

You can use explain plan in SQLPlus
SQL>  explain plan for select * from user_tables;
Explained.
Elapsed: 00:00:01.63
SQL> select * from table(dbms_xplan.display());
PLAN_TABLE_OUTPUT
Plan hash value: 806004009
| Id  | Operation                       | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT                |          |  2014 |  1123K|   507   (6)| 00:00:07 |
|*  1 |  HASH JOIN RIGHT OUTER          |          |  2014 |  1123K|   507   (6)| 00:00:07 |
|   2 |   TABLE ACCESS FULL             | SEG$     |  4809 |   206K|    34   (3)| 00:00:01 |
|*  3 |   HASH JOIN RIGHT OUTER         |          |  1697 |   873K|   472   (6)| 00:00:06 |
|   4 |    TABLE ACCESS FULL            | USER$    |    74 |  1036 |     3   (0)| 00:00:01 |
|*  5 |    HASH JOIN OUTER              |          |  1697 |   850K|   468   (6)| 00:00:06 |
|   6 |     NESTED LOOPS OUTER          |          |  1697 |   836K|   315   (6)| 00:00:04 |
|*  7 |      HASH JOIN                  |          |  1697 |   787K|   226   (8)| 00:00:03 |
|   8 |       TABLE ACCESS FULL         | TS$      |    13 |   221 |     5   (0)| 00:00:01 |
|   9 |       NESTED LOOPS              |          |  1697 |   759K|   221   (8)| 00:00:03 |
|  10 |        MERGE JOIN CARTESIAN     |          |  1697 |   599K|   162  (10)| 00:00:02 |
|* 11 |         HASH JOIN               |          |     1 |   326 |     1 (100)| 00:00:01 |
|* 12 |          FIXED TABLE FULL       | X$KSPPI  |     1 |    55 |     0   (0)| 00:00:01 |
|  13 |          FIXED TABLE FULL       | X$KSPPCV |   100 | 27100 |     0   (0)| 00:00:01 |
|  14 |         BUFFER SORT             |          |  1697 | 61092 |   162  (10)| 00:00:02 |
|* 15 |          TABLE ACCESS FULL      | OBJ$     |  1697 | 61092 |   161  (10)| 00:00:02 |
|* 16 |        TABLE ACCESS CLUSTER     | TAB$     |     1 |    96 |     1   (0)| 00:00:01 |
|* 17 |         INDEX UNIQUE SCAN       | I_OBJ#   |     1 |       |     0   (0)| 00:00:01 |
|  18 |      TABLE ACCESS BY INDEX ROWID| OBJ$     |     1 |    30 |     1   (0)| 00:00:01 |
|* 19 |       INDEX UNIQUE SCAN         | I_OBJ1   |     1 |       |     0   (0)| 00:00:01 |
|  20 |     TABLE ACCESS FULL           | OBJ$     | 52728 |   411K|   151   (4)| 00:00:02 |
Predicate Information (identified by operation id):
   1 - access("T"."FILE#"="S"."FILE#"(+) AND "T"."BLOCK#"="S"."BLOCK#"(+) AND
              "T"."TS#"="S"."TS#"(+))
   3 - access("CX"."OWNER#"="CU"."USER#"(+))
   5 - access("T"."DATAOBJ#"="CX"."OBJ#"(+))
   7 - access("T"."TS#"="TS"."TS#")
  11 - access("KSPPI"."INDX"="KSPPCV"."INDX")
  12 - filter("KSPPI"."KSPPINM"='_dml_monitoring_enabled')
  15 - filter("O"."OWNER#"=USERENV('SCHEMAID') AND BITAND("O"."FLAGS",128)=0)
  16 - filter(BITAND("T"."PROPERTY",1)=0)
  17 - access("O"."OBJ#"="T"."OBJ#")
  19 - access("T"."BOBJ#"="CO"."OBJ#"(+))
42 rows selected.
Elapsed: 00:00:03.61
SQL> If your plan table does not exist, execute the script $ORACLE_HOME/RDBMS/ADMIN/utlxplan.sql to create the table.

Similar Messages

  • In ST03 , how can i see the Query name, user id,how many times executed the

    HI Experts,
    In ST03 , how can i see the Query name, user id,how many times executed the query.
    these details how do i get from the above transaction.
    EX:-if there is one report name X,I want to know how many users had executed X report today,weekly,monthly.
    ex:-query userid total number of execution
    sales order 0000555 5 times
    custmer 05855 2 times
    fast reply will be appreciated,

    Hi,
    Look here:
    http://help.sap.com/saphelp_nw04/helpdata/en/3b/54df4204892a78e10000000a155106/frameset.htm
    Also check these:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/b8be3befaefc75e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/25/ece73a39e74d27e10000000a114084/frameset.htm
    Hope this helps..
    Bye
    Dinesh

  • In ST03 , how can i see the Query name, user id,how many times .

    HI Experts,
    In ST03 , how can i see the Query name, user id,how many times executed the query.
    these details how do i get from the above transaction.
    Points will be awarded.
    BR
    sivs

    Hi Siva,
    Reporting statistics data is only written to the database table if BW statistics have been manually activated for the corresponding InfoProvider first. If this has not been done, it is therefore not possible to display any reporting statistics in transaction ST03.
    Therefore activate the reporting statistics for all relevant InfoProviders. To do this, set the OLAP flag in the BW Administrator Workbench (transaction RSA1) in the area Tools ® BW Statistics for InfoProvider.
                    Check here...........
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/86df4254d81e1fe10000000a155106/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    Hope this will help you shiva.........
    Regrads,
    Vijay

  • How can I see the Query view created for a different user

    Hi All,
    How can a user see the View of a query created for a different user??
    I would like some info about how to give access ( if it is a access problem) or tell me the steps to do that.
    Regards, Federico

    Hi all,
    Maybe I didn't explain me as i should or maybe you dont know what is a Query View. Lets try again, showing you the steps to open a "Query view".
    This way is from Bex Analyzer (Excel)
    I open the Bex Analyzer and connect to the system -> Open query -> Under "Type" choose "Query View"...this is just a different view of the original query (more or least columns/rows).
    This way is from Bex Web:
    Once you open/execute the query, you have a ComboBox to choose the view (previously saved)
    The problem that we have is that the views created for a user, can NOT be found by other user. The only user who can is the owner.
    Could it be an authorization problem? or is ther any configuration possible to see it?
    Thanks in advance, Federico

  • Spool file problem,Can't see the query in output file.

    Hello ,
    I am facing a very old school kind of problem .....about spool file ....
    The scenario -
    I have made a script by name DB_Status_checkup.sql which i want to fire on the database to check the database status. In this script their are many queries regarding the data dictionary views to know about the database. It consist of nearly 25-30 different select queries..
    The problem is i want to make a spool file of the output of that query....i want to see the SQL query & the output below in the spool file, so it will be easy for me to judge the result. But i can't see the SQL query , i can only see the output , & in so many queries it all gets jumbled up....even i can't understand where the next output starts ...
    Sample of my SQL Script ....
    clear buffer
    spool D:\DB_status.txt
    /*To check the database startup time*/
    Select to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup time"
    from v$instance
    .........next query n so on....
    spool off;
    In the output pf the spool file at D:\db_status.txt..
    Startup time
    08:25 16-JUL-10It shows only the output of the query in the spool file not the query,
    What should i do to get the SQL query as well as the output of that query just below it in the spool file ???
    Please suggest if you have anymore ideas , regarding this .....
    ORACLE 10g R2
    Windows Server 2008
    Thanks in advance ...

    Why don't you just use database control, instead of re-inventing the wheel?
    Apart from that, SQL*Plus has it's own reference manual, which you apparently refuse to read.
    The answer to your quiz/doc question is
    set echo on
    Sybrand Bakker
    Senior Oracle DBA

  • Universe Designer vs BEx query - Can't see the query in the OLAP Cubes list

    Hello Experts,
    We are facing a rather strange issue:
    While creating a connection to an existing BEx query - which wasn't being used by BO before - we aren't able to see that one query in a long list of available multiproviders/queries on the universe side.
    We already checked the option on BEx analyser to authorize external access to the query, with ODBO.
    The connection type we're using is the same for all the other universes built on top of BEx queries: SAP BW Client. Again, we already have a bunch of universes built using this method, but we can't seem to find the BEx query in the OLAP Cubes list.
    Does anyone have a lead on what may be causing this issue?
    Our environment is:
    - SAP BOE XI R3.1 SP2
    - SAP BW 3.5
    - BEx Analyser
    - Integration Kit
    Best Regards,
    Francisco

    Hi,
    i don't know, you'd have to search the BW-BEX component for notes.
    I noticed it with a revision of SAP GUI Front End tools 720 SP7 i think
    I applied the latest corrections (SP08 or 09) and that tickbox worked ok again.
    You might notice - as i did - that when you go back to check the bex query - that property becomes 'magically' unselected/
    Regards.
    H

  • Can I "see" the query string built by PreparedStatement?

    Hi all.
    When using a PreparedStatement, is there a way to see the SQL String built by the class, that is the query that's going to be executed by the "executeQuery()"?
    I'd need it for debugging reasons...
    Any help will be very appreciated!!

    http://www.javaworld.com/javaworld/jw-01-2002/jw-0125-
    overpower.htmlThis works great , that's was I was looking for.
    Thanks hermione!!
    I can't but recommend it to everyone that want to accomplish the same.

  • Final user's can not see the data due to limited authorization.

    We have created a InfoSet with three info Objects, 0Account, 0Costcenter and 0COMP_CODE. 0Costcenter have an attribute retail location  0RT_LOCATIO.
    0RT_LOCATIO is an authorization relevant object. We as consultants can execute the infoset properly, but final user's with limited authorizations can not see the data because of authorization failier
    We hae several options to solve the issue, deleselect the auth. flag in the infoobject; delete the infoobject from the attributes of the cost center or create an authorization object and assign it to the final user's profile. But we don't want to go that way.
    My question is, is there any way to avoid including this attribute in the infoset definition? We are not using it in the query and we don't need it, so if we could delete it from the infoset (in the same way you add or delete infoobjects from an Infocube) without changing the cost center aster data, we will have our problem solved.
    Does anyone how to do this (if possible)?
    Thanks in advance!

    Just do two things to find the authorization check failed for that user.
    1. Execute SU53 output and find out the authoirzation check failed. If yes, please send that to BASIS Team.
    2. Next one, switch on the authorization trace in ST01 and ask that user to see that data. if the user is failed with authorization issue. switch off the trace in ST01 and find out the issue.
    Do this way, if it is not successful you can go for any other alternate way.
    Hope this would help you.

  • How can I see the MAD results in my planning book

    Hello Gurus:
    I'm setting up some statistical models in APO DP and running some test data through them.  How can I see the results of the MAD to verify if the models are calculating correctly?  I was hoping I can see the monthly MAD values in a key figure in my planning book?
    Does anyone know?
    Andrea

    Hello Andrea,
    As far as I know, I don't think there's a standard key figure or macro could acheive this.
    MAD or other errors in forecast are not saved as time series, so I don't know why you want to see them as time series.
    You can see the forecast errors in forecast result screen, and if you push comparision button, you can see forecast errors for several last runs.
    But I don't know how to put these value into planning book, unless you want to apply your own logic ...
    Best Regards,
    Ada

  • TS3276 Having trouble sending jpeg images as attachments in Mac email.....they go thru as images and PC users can't see the SAVE or QUICK LOOK boxes that Mac mail has.  One friend scrolled over the image, right clicked on it and saved as a PNG file.

    Having trouble sending jpeg images as attachments in Mac email.....they go thru as images and PC users can't see the SAVE or QUICK LOOK boxes that Mac mail has.  One friend scrolled over the image, right clicked on it and saved as a PNG file.

    Apple Mail isn't going to change the format of any of your attachments. it isn't going to corrupt them either.
    Exchange is a transport protocol and server. The issue you describe is not related to Exchange.
    There are many different versions of Microsoft Outlook in use and they all have e-mail bugs. Different versions have different bugs. Some Apple Mail hack to get around a bug in Outlook 2003 may cause the same message to be problematic in Outlook 2000. Fix them both and another issue will cause trouble in Outlook 2007. You can't fix this. Apple can't fix this. Microsoft can and has but that is irrelevant if your recipients are using older versions.
    One specific problem is that Apple Mail always sends image attachments inline, as images, not as iconized files. You can change this with Attachment Tamer. Just be aware that use of this software will break other things such as Stationery. E-mail is just a disaster. To date, no one outside of Apple has ever implemented the e-mail standards from 1993. Apple has continually changed its e-mail software to be more compatible with the de-facto standards that Netscape and Microsoft have unilaterally defined and people documented as "standards" after the fact. The e-mail messages that Apple Mail sends are 100% correct and do not violate any of the original standards from 1993 or the Microsoft/Netscape modifications. The problem is entirely bugs and limitations in various versions of Outlook.

  • A user can only see the public area in a collaboration room

    Hi all,
    We have experienced that a certain user can only see the public area of
    a collaboration room although the user has member rights to see more
    content.
    We have tried to remove the user from the room and add him again. It
    did not help.
    Other users have been added before and after this user without problems.
    What could be wrong with this user?
    Regards,
    Ashwin

    Hi Ashwin,
    Check the roles and the groups by this user..  Is the same of the others users?
    Regards
    Eduardo

  • After changing a mail list name in Server end, users can't see the update in outlook client

    Dear all,
    This is a real issue. I am a Help-desk in a global company and after changing a mail list name in Server end, users can't see the update in outlook client. Even I download Offline address book in full detail, user still can't see the change in her outlook.
    Does anyone know how to fix it?
    Thanks,
    Franklin hong

    Hi,
    Would you please detail what you did by "changing a mail list name in Server end"? What is the mail list and what server?
    If you switch to Online Mode instead of Cached Exchange Mode, does the user see the change?
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • If I load a video on a nano to give out at a business conference can recipients see the video when they open the device? Iwas told it will wipe when a new user opens the device.

    If I load a video on a nano to give out at a business conference can recipients see the video when they open the device? I  was told it will wipe when a new user opens the device.

    No, it will wipe it when they try to connect it to a computer and set it up under their own Apple ID. When they turn on the device the first time without connecting it to anything they will be able to see the video.

  • Can I see the User form trace

    hi,
    Can I see the intermediate values for the fields in the User forms.
    Thanks

    Enable trace in the System Configuration object.
    From Debug page > List Objects> Configuration> System Configuration. Click Edit.
    Look for Workflow Trace and enable it. Write it to a file if it is your local server. If it is a remote server then set the value of console trace to true.
    This will genetrate the output onto the browser.
    Regards
    Vinod

  • End user can't see the KM content

    Hi,all
    If the end user can't see the KM content(pictures,text documents)
    what may e the problem?On my pc all is working fine.
    May be it depends on InternetOptions->Security options on
    specific computer?
    Regards,
    Michael

    Hello Michael,
    1> Are you an end user as well/
    2> Try and chek the permissions of each Km content i.e pictures, text, documents.
    If the end user does not have rhe permissions then you will have to assign the permissions before the nd user could see rh content
    Thanks
    Pradeep Bhojak

Maybe you are looking for