How can I know which queries run in the TEMP tbs (Oracle 9i and 10g) ?

Dear friends, do you have a query which can shows which statements are running currenly in the TEMP tablespace?
Many Thanks in advance, Marcelo.

Marcelo,
you can check DBMS_XPLAN.DISPLAY_CURSOR - if you find a column TempSpc there, it's using Temp space.
select source from sys.source$ order by source;
select * from table(dbms_xplan.display_cursor(NULL, NULL, NULL));
PLAN_TABLE_OUTPUT
SQL_ID  5ywbw0z6gupwk, child number 0
select source from sys.source$ where rownum < 555555 order by source
Plan hash value: 1381731087
| Id  | Operation           | Name    | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT    |         |       |       |       | 11492 (100)|          |
|   1 |  SORT ORDER BY      |         |   555K|    37M|    87M| 11492   (1)| 00:02:18 |
|*  2 |   COUNT STOPKEY     |         |       |       |       |            |          |
|   3 |    TABLE ACCESS FULL| SOURCE$ |   572K|    38M|       |  1834   (1)| 00:00:23 |
---------------------------------------------------------------------------------------or for all your statements currently available:
SELECT t2.*
FROM v$sql s, table(DBMS_XPLAN.DISPLAY_CURSOR(s.sql_id, s.child_number)) t ,
     table(DBMS_XPLAN.DISPLAY_CURSOR(s.sql_id, s.child_number)) t2
WHERE t.PLAN_TABLE_OUTPUT like '%TempSpc%';Edit: Sorry, I didn't see you are also asking for 9i. DISPLAY_CURSOR is only available in 10g+ - but Tom Kyte and others have shown WorkArounds to use DBMS_XPLAN.DISPLAY from 9i to show the information for all available SQLs.
2nd Edit:
TempSpc only shows the estimation the optimizer makes.
You can check V$SQL_PLAN_STATISTICS_ALL for the columns max_tempseg_size and tempseg_size. In Addition please have also a look on [http://antognini.ch/about/] Blog [http://antognini.ch/2009/05/wrong-information-about-temporary-space-usage/] .
I used:
select PARENT_ID, ID, DEPTH, POSITION,
       MAX_TEMPSEG_SIZE, LAST_TEMPSEG_SIZE
from v$SQL_PLAN_STATISTICS_ALL
where MAX_TEMPSEG_SIZE > 0;hth,
Martin
Edited by: berx on Jun 17, 2009 4:11 AM
Edited by: berx on Jun 17, 2009 6:18 AM

Similar Messages

  • How can I know which clients are connected to my network through express and which are connected through extreme?

    I have an airport express extending, through wireless, a network provided by an airport extreme. How can I know which clients are connected to my network through express and which are connected through extreme?
    Here you can see both routers:
    I would expect to some clients connected to the express, other than the extreme. And that's all I see: only the airport extreme appears as client of the airport express.
    Below, one can see the summary of the config for both routers.
    Would somebody explain it?
    Thanks,
    Marcelo
    Message was edited by: Marcelão

    please disregard this answer.
    Message was edited by: Marcelão

  • How can I know which photos are in the library was used in each album I have created before.

    How can I know which photos are in the library was used in each album I have created before?
    I have many photos in the library folder of iPhoto, but actually I don't know which photos were used in my album.
    Is there any method to find this?
    Thanks.

    Album or Book?
    If Album you can find the ones not already used:
    File -> New Smart Album
    Album -> is not -> Any
    Regards
    TD

  • How can I know which has brought down the database SI or SA

    Hi to all,
    Hi
    Sorry about this simple question but i am little bit confused.
    Suppose if i used Shutdown immediate and i use Shutdown abort then how can i know which brought down my database Shutdown immediate(SI) or Shutdown abort(SA)
    Please help me !!!!!

    Hi,
    Ofcourse shutdown abort will execute...
    See the output from alert log
    Tue Jun 01 11:54:17 2010
    Shutting down instance (immediate)
    Stopping background process SMCO
    Tue Jun 01 11:54:35 2010
    Shutting down instance: further logons disabled
    Tue Jun 01 11:54:39 2010
    Shutting down instance (abort)
    License high water mark = 125
    USER (ospid: 5436): terminating the instance
    Instance terminated by USER, pid = 5436
    Tue Jun 01 11:54:42 2010
    Instance shutdown complete
    Thanks,
    Ajikumar G
    Expertise in Oracle Apps...

  • How can i know which version of Smartview is installed on my system ?

    Hi All,
    How can i know which version of Smartview is installed on my system ?

    Do you know what version of Essbase you are running? that could help. You can find that in EAS. Right click on the server name and select edit ptoperties, then look on the environment tab. As a final measure, find the smartview.exe on yout machine right click and select properties. in one of the tabs there might be a version number

  • How can I know which link was clicked in the link list

    Hi everyone
    I'm using list of links in my page to display list of the files in some directory.
    How can I know which link user was clicked. There are some code:
    <%
    String dir = "..//files//";
    File fin = new File(dir);
    File files[]=fin.listFiles();
    for(int i=0;i<files.length;i++)
    File x = files;
    %>
    <%=x.getName()%><br>
    <%
    %>
    Please help

    You need to pass some data on the querystring to the page you are linking to.
    <a href="Main_Work.jsp?file=<%=x.getName()%>"><%=x.getName()%></a><br>
    This will send a parameter called "file" with the value of the file name that the user clicked.
    Now in Main_Work.jsp you can access this data as follows:
    <%
    String s = request.getParameter("file");
    File f = new File("..//files//"+s);
    %>

  • How can i know which index will be used when executing the query ?

    1 ) I have query in which i have 3-4 tables but there multiple index on one column .
    so how can i know which index will be used when executing the query ?
    2) I have a query which ia taking too much time . how can i know which table is taking too much time ?
    3) Please Provide me some document of EXplain plan ?

    Hi Jimmy,
    Consider the below example
    /* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
    CREATE TABLE FIRST AS
    SELECT * FROM all_objects;
    UPDATE FIRST
    SET object_name = 'TEST'
    WHERE owner != 'SCOTT';
    CREATE INDEX idx_first ON FIRST(object_name);
    SELECT *
    FROM FIRST
    WHERE object_name = 'TEST';
    It has not used index
    Execution Plan
    Plan hash value: 2265626682
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 58678 | 7334K| 163 (4)| 00:00:02 |
    |* 1 | TABLE ACCESS FULL| FIRST | 58678 | 7334K| 163 (4)| 00:00:02 |
    /* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
    SELECT *
    FROM FIRST
    WHERE object_name = 'emp';
    This has used the index
    Execution Plan
    Plan hash value: 1184810458
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 128 | 1 (0)| 00:00:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| FIRST | 1 | 128 | 1 (0)| 00:00:01 |
    |* 2 | INDEX RANGE SCAN | IDX_FIRST | 1 | | 1 (0)| 00:00:01 |
    From this we can come to the conclusion that, whether to use one index or not by oracle
    would also depend on the data which is present in the table. This has to be this way as
    we see in the bind peeking, if oracle sticks to only one plan, say only use the full table
    scan, it would be a performance hit when it searches for the second query ie where object_name
    ='emp';
    2.
    If we have a query like below.
    select * from emp
    where upper(ename) = upper(:p_ename);
    Evenif we have the index on ename column, oracle wouldn't be able to use the index, as there is a function in the predicate column. If you need oracle to use the index, we need to create a function based index as below.
    Create index idx_ename on emp(upper(ename));
    Regards,
    Cool

  • How can I know which screen-group is?

    Hi experts!!
    I don't know how can I know which screen-group is associaciate to the values...for example, how can I associate  this block to a screen-group for after do this?  IF SCREEN-GROUP1 EQ 'DAT'.
    SELECTION-SCREEN BEGIN OF BLOCK B9 WITH FRAME TITLE TEXT-017.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS: FECHA FOR P0001-BEGDA MODIF ID DAT.
    SELECTION-SCREEN END OF BLOCK B9.
    Thanks and regards,
    Rebeca

    Hi,
    Check out this code.
    REPORT  Z94406_TEST_123                         .
    TABLES: pa0001,t549a.
    DATA: n(6) TYPE c.
    SELECTION-SCREEN BEGIN OF BLOCK za2 WITH FRAME.
    PARAMETERS:p1  RADIOBUTTON GROUP grp1 user-command a DEFAULT 'X'.
    SELECT-OPTIONS: s_prd1 FOR n NO-EXTENSION modif id G1.
    PARAMETERS:p2  RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_period FOR pa0001-begda NO-EXTENSION modif id G2.
    SELECTION-SCREEN END OF BLOCK za2.
    AT SELECTION-SCREEN OUTPUT.
    if p1 = 'X'.
    LOOP AT SCREEN.
        IF screen-group1 = 'G2' or screen-group1 = 'G2'.
                screen-input = '0'.
          MODIFY SCREEN.
       ENDIF.
      ENDLOOP.
    ELSE.
      IF screen-group1 = 'G2' or screen-group1 = 'G2'.
          screen-input = '1'.
          MODIFY SCREEN.
       ENDIF.
      ENDLOOP.
       ENDIF.
    Regards,
    Syed

  • How can one decide which queries need BIA to enhance their performance?

    How can one decide which queries need BIA to enhance their performance?

    Queries with high data access times will usually require BIA. This can be found by using the Event IDs...
    Please do not post across forums - your earlier post was deleted as duplicate.
    Also search the forums before posting... this question has been answered earlier...
    Edited by: Arun Varadarajan on May 5, 2009 7:24 PM

  • How can we know which index is triggered

    hi all ,
    how can we know which index is triggered in perticular select statement ? is that just based on the fields which used in the select statement or can we know from ST05 ?
    thanks,
    ram

    Hi Ram,
    You can go to transaction ST04(if you are authorised)...
    Now select 'Detail analysis menu' button.
    Now select SQL Request button under 'Resource consumption by' section.
    Now in the ' SQL statement pattern by ' field , give the part of the select statement you want to check.
    Now press execute.
    Now select the line item displayed and goto menu option <b>Goto->Explain SQL</b>.
    It will give you the execution plan for the particular SQL statement.
    From here you can get the index values from INDEX RANGE SCAN statement in this output.
    Hope this has been of some help to you...
    Regards,
    SP.

  • How can I know which file is using by the self-service workflow?

    Dear all:
    In my directory, there are two HRSSA.wft and How can I know which source is using by the workflow of the self-service ?
    my environment is oracle 11.5.9 | self-service 4.1 | workflow builder 2.6
    Thanks
    regards
    Terry

    One way would be to download the HRSSA workflow to a wft file (using the WFLOAD utility - see MOS Doc 578248.1), then comparing this downloaded wft file with the two files you have (using a utility such as diff in Unix). The comparison that reports no differences will identify the wft that was uploaded into the database.
    HTH
    Srini

  • On the Web Wiz Forum, id="gwProxy" ="" ="ifofjsCall==''jsCall;elsesetTimeout'jsCall',500;" id="jsProxy" ="" is added to every reply that I make. Safe mode cures it but how do I know which add-on is the problem?

    When I go to a reply window, sometimes it almost looks like there is a little window/box appears (with the 6 dots that allows the size to be changed) It appears to be the cause of the string/code?
    On the Web Wiz Forum, < id="gwProxy" ="">< ="ifofjsCall==''jsCall;elsesetTimeout'jsCall',500;" id="jsProxy" ="">
    to be added once the reply is posted, to every reply that I make. Safe mode cures it but how do I know which add-on is the problem? I have 25-30 add-ons.

    Disable all addons by going to Tools -> Addons and clicking the disable button in every entry under Extensions or Plugins panels.
    Restart Firefox.
    Confirm the problem isnt there.
    Enable each addon one by one by going to Tools -> Addons and clicking the enable button in every entry under Extensions or Plugins panels, in such a way that each time you enable ONE addon, you RESTART the browser and see if the problem STILL happens.
    AS SOON AS the problem happens, disable the last addon you enabled. That one is the culprit. You can now enable all the others, if needed.

  • When opening a Photoshop file with Bridge, how can I control which version of Photoshop the file wil

    When opening a Photoshop file fthrough Bridge, how can I control which version of Photoshop the file will open in?
    I store my PSD files adjacent to the original RAW file from which it was derived.
    If I open the file folder and double click on that PSD file, it opens in CS6. But,if I use Bridge (CS6) to navigate to and open the same file, it first opens Photoshop CS5 and then opens that PSD file in CS5.
    How can I control which Photoshop will open a file I select when opening it through Bridge?.

    Interesting, but it doesn't give a clue what I'm supposed to do. No Photoshop ducuments listed.
    Look at the PSD file on the location Curt provided and search for Photoshop Document. Next to it ideally should show Adobe Photoshop CS6 if you have Bridge CS6 open. Click on it to provide the fly out menu and choose the correct Photoshop from the list.
    But probably something went wrong with your install. By default Bridge chooses the latest version of PS to open its file in.
    Maybe a reset of the preferences might also help you. Can you provide more details about OS version etc.
    And do you have a good reason for keeping your Raw and finished files in the same location. Personally I keep them apart and use a proper file name convention (yyyymmdd and details) so I can easily search for the DNG files in my archive if I needed them but I don't make mistakes in opening the wrong one

  • How can i stop apps from running in the background with the new ios7 update

    How can i stop apps from running in the background with the new ios7 update

    Double tap the Home button...slide the last used view of the app(above the icon) up. Tap Home button when finished.

  • HT1338 I wanted to import files but the computer says that there is not enough free space. how can i see which files take up the space?

    I wanted to import files but the computer says that there is not enough free space. how can i see which files take up the space?

    Here's freeing up disk space.
    DALE

Maybe you are looking for

  • Cannot set up mail on iPod Touch using Mac's AirPort WI-FI.

    This is FYI. My problem has been fixed so this might help someone. I could not set up my mail account on my new iPod Touch using my home Mac's AirPort WI-FI. I do not have a separate wireless router. I am running Tiger OSX 10.4.11 with an iMac. Safar

  • Content conversion problem

    Hi gurus I sem to have a really silly problem I'm only getting the FIRST field  on file content conversion and no new line here's a part of the XML file from the payload manifest <?xml version="1.0" encoding="UTF-8" ?> - <rfc:Z_XI_005_RFC xmlns:rfc="

  • Graphics Card for 30" display

    I just bought the 30" cinema display and it won't go higher than 1280 x 800 resolution. Do I need a dual link dvi card to maximize the resolution? I am on a pc (win xp) with a Nvidia GeForce 6800 card. I've been told this card should be able to go to

  • My cd drive isn't reading cds anymore, any suggestions?

    Whenever I put in a CD into my macbook, I hear it work, however it never shows up on my desktop or anywhere else, and sometimes the CD ejects automatically soon later .. Any help?

  • Fcp keeps crashing on capture

    Please help! I don't know why this is happening. I am pasting the crash report - as this is the 2nd time since trying to capture. Process:         Final Cut Pro [757] Path:            /Applications/Final Cut Pro.app/Contents/MacOS/Final Cut Pro Ident