Procedure using lot of temp space

Hi all,
DB version is 10.2.0.4. A procedure named xxxx while executing using 10gb of temp tablespace...What are the basic checklist of tuning that procedure...
thanks,
baskar.l

http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/toc.htm

Similar Messages

  • SQL query using lot of Temp space

    I have sql query which is using lot of temp space , please suggest some ways to reduce this
    SELECT A.POSITION_NBR, TO_CHAR(B.EFFDT,'YYYY-MM-DD'), rtrim( A.SEQNO), A.EMPLID, B.REG_REGION, A.MANAGER_ID, A.REPORTS_TO, case when A.POSITION_NBR = A.REPORTS_TO THEN 'POS reports to same position' else 'Positions with multiple Emp' End Case
    FROM PS_Z_RPTTO_TBL A, PS_POSITION_DATA B, PS_POSTN_SRCH_QRY B1
    WHERE B.POSITION_NBR = B1.POSITION_NBR AND B1.OPRID = 'MP9621Q' AND ( A.POSITION_NBR = B.POSITION_NBR AND ( A.REPORTS_TO = A.POSITION_NBR AND B.EFFDT =
    (SELECT MAX(B_ED.EFFDT)
    FROM PS_POSITION_DATA B_ED
    WHERE B.POSITION_NBR = B_ED.POSITION_NBR) AND A.POSITION_NBR <> '00203392') OR ( B.EFFDT =
    (SELECT MAX(B_ED.EFFDT)
    FROM PS_POSITION_DATA B_ED
    WHERE B.POSITION_NBR = B_ED.POSITION_NBR AND B_ED.EFFDT <= SYSDATE) AND B.MAX_HEAD_COUNT <>
    (SELECT Count( C.EMPLID)
    FROM PS_Z_RPTTO_TBL C)) ) UNION
    SELECT F.POSITION_NBR, TO_CHAR(F.EFFDT,'YYYY-MM-DD'), '', '', F.REG_REGION, '', F.REPORTS_TO, ''
    FROM PS_POSITION_DATA F, PS_POSTN_SRCH_QRY F1
    WHERE F.POSITION_NBR = F1.POSITION_NBR AND F1.OPRID = 'MP9621Q' AND ( F.EFFDT =
    (SELECT MAX(F_ED.EFFDT)
    FROM PS_POSITION_DATA F_ED
    WHERE F.POSITION_NBR = F_ED.POSITION_NBR AND F_ED.EFFDT <= SYSDATE) AND F.EFF_STATUS = 'A' AND F.DEPTID IN
    (SELECT G.DEPTID
    FROM PS_DEPT_TBL G
    WHERE G.EFFDT =
    (SELECT MAX(G_ED.EFFDT)
    FROM PS_DEPT_TBL G_ED
    WHERE G.SETID = G_ED.SETID AND G.DEPTID = G_ED.DEPTID AND G_ED.EFFDT <= SYSDATE) AND F.REG_REGION = G.SETID AND G.EFF_STATUS = 'I') )
    Thanks in Advance
    Rajan

    use {noformat}<your code here>{noformat} tags to format your code.
    I have sql query which is using lot of temp space , please suggest some ways to reduce thisIf your sort_area_size is not set sufficient oracle used temp space for sorting operation. As your code is not readable i cant say much more than this. Check with your DBA if you have to increase the temp space.

  • How to determine what's using data store temp space?

    How can one determine what's using data store temp space? We are interested to know what structures are occupying space in temp space and if possible what pid/process connected to TimesTen created them.
    Also, is there a procedure that will work if temp space is full?
    Recently one of our data stores ran of space. We we're unable to run commands like "monitor", "select * from monitor", "select count(*) from my_application_table", etc. These commands failed because they required temp space to run and temp space was full. We killed the application processes, this in turned freed up temp space, then we were able to run these queries.
    Ideally, we'd like to have a procedure to figure out what's using temp space when temp space is full.
    The other thing we could do is periodically monitor temp space prior to it filling to determine what's using temp space.

    That was my original thought, but once you click the slider track or thumb, and then enter a value in the text control, the clickTarget on the change event envoked by the change to the bound data (after entering a value in the text control) will be whatever slider element had last been clicked. If you've never clicked the slider, clickTarget=null. But once you've clicked the slider the clickTarget always has a value of "thumb" or "track", regardless of what triggered the change event.

  • Report consuming a lot of temp Space (BIP)

    Hi Experts,
    I am facing an issue.
    Some BIP reports consuming a lot of temp space (5-30 gb temp directory), which is causing service down (BIP, RMS, ReIM and RPM). BIP, RMS, ReIM and RPM are installed on same server.
    Please help to troubleshoot this issue.
    Thanks in Advance

    plz see
    Troubleshooting Oracle BI Publisher Enterprise 11g [ID 1387643.1]
    Troubleshooting Oracle BI Publisher Enterprise 10g [ID 412232.1]

  • GWTDOMAIN using lots of swaps space in WLE 4.2!!!

    We are having problem in one our of non- production environments where the GWTDOMAIN is using lots of swap space and not releasing them. It got so bad that the swap space used was 100% and we had to "kill -9" this GWTDOMAIN and bounce it again to to release this space. Is this a known bug and if not what can I do to resolve this problem
    or do we need to open a trouble ticket with BEA to fix.
    Thank for your help.
    Bayo Alege
    Senior Analyst, Systems
    CIMG
    513-723-2954

    Excessive archivelog generation on an EM12c repository database may mean you are hitting bug 14726136. Please see MOS note 1502370.1. I would suggest filing an SR with support to confirm whether or not you are experiencing this bug; they can help you with some additional analysis.

  • /Volumes using lots of disk space

    Doing a get info on my server boot drive shows its using 53Gb of space which seemed very high to me considering what is on there
    So I ran the command
    sudo du -chxd 1 /
    it reported that /Volumes was using 39Gb
    Obviously I don't just want to remove what is in there as it is all the mounted volumes and I don't want to risk deleting data on them
    how can I clear out this phantom data?

    /Volumes contains entries for every mounted volume on your computer, so if you have any external hard disks, CDs, DVDs, or additional partitions they are show up in /Volumes and will therefore be included in that figure. What's more the actual boot drive itself also shows up in /Volumes. However normally this should not be an issue because the du (diskspace usage) command is clever enough to know the difference between files on one drive/volume/partition or another.
    What I have seen happen however on a server providing network home directories is a crash to upset entries in the /Volumes directory. What happens is that normally you have an additional volume mounted on your server, lets say it is called Users this will therefore show up in /Volumes as /Volumes/Users this is then shared by the server and network login accounts store their home directories in this. Lets say there is then a crash on the server, because there has been a crash the normal shutdown process has not occurred and as a result the normal steps that 'unmount' this volume have not occurred. Therefore when the server is rebooted the folder /Volumes/Users still exists. What can happen then is that the auto-mount process will 'mount' the volume against a new entry called /Volumes/Users-1 even though it still shows in the Finder as just having the name Users. In fact if you connected two volumes at the same time with the same name the same thing happens.
    At this point we now have two entries in /Volumes one called /Volumes/Users which is a left over from before the crash, and the new live entry which is called /Volumes/Users-1 the problem is that Open Directory is telling the users to access and store their network home directories in /Volumes/Users and that left over folder is being automatically shared by the server. Therefore when a user logs in they start automatically putting files in that leftover folder which is actually on the boot drive and no longer corresponds to the second volume.
    Potentially several Gigabytes of data could end up in their incorrect entry.
    You need to see what stuff in /Volumes is actually making up your disk space use. You can do this by the following command
    sudo du -achx /Volumes
    This should list all files/folders on the boot drive that are in /Volumes but exclude files stored on mounted drives.

  • OEM 12c using lots of DB Space and generating over 100Gbytes logs daily

    We have upgraded to OEM12c, but we notice that
    1.     Tablespace Mgmt_tablespace is growing very rapidly about 5GBytes every week
    2.     and we are generating many achieve logs in my case 100 gbytes in every days
    Is this normal and are there anything I can do to reduce the space usage?
    Is anyone having this problem or is it just me
    Many thanks
    Edited by: user10745648 on Mar 5, 2013 2:00 PM
    Edited by: user10745648 on Mar 5, 2013 2:22 PM

    Excessive archivelog generation on an EM12c repository database may mean you are hitting bug 14726136. Please see MOS note 1502370.1. I would suggest filing an SR with support to confirm whether or not you are experiencing this bug; they can help you with some additional analysis.

  • Hacking around temp space SS enqueues

    Metalink Notes 465840 (Configuring Temporary Tablespaces for RAC Databases for Optimal Performance) and 459036 (Temporary tablespace SS Contention In RAC) refer.
    I have the following bugs occurring with a vengeance on 10.1.0.3:
    Bug 4882834 - EXCESSIVE SS AND TS CONTENTION ON NEW 10G CLUSTERS
    Bug 6331283 - LONG WAITS ON 'DFS LOCK HANDLE'
    I'm trying to find a work around for many background processes running 24x7 processing a lot of data. These are run in a single schema (VPDB applies and this schema is the owner and exempt from FGAC).
    What would be nice is to have something similar to SET TRANSACTION to select a specific dedicated undo space.. but for temp space. If I can get each of my major job queues (home rolled FIFO and LIFO processing queues using DBMS_JOB) to use a different temp space, SS contention should be hopefully reduced.. or not?
    Anyone else sitting with this problem or did in the past? And if past, exactly what Oracle patchset resolved the problem?
    Edited:
    Fixed the spelling error in subject title

    > How big per trasnaction sort size and pga size?
    Fairly large. A typical transaction can select up to 50+ million rows and aggregate it into a summarised table. There are a couple of these running in parallel. Given the nature of the volumes we process, there's very little flexibility in this regard (besides growing data volumes and an increasing complexity of processing)...
    Though, when a process does go through without butting its head against an Oracle bug (fortunately more often than not), performance is pretty impressive.

  • ITunes 10.5.2 is writing a lot of temp.tmp files and using up many gigabytes of disk space! It seems as if it is completely out of control!

    iTunes 10.5.2 on my macbook pro is writing a lot of temp(number).tmp files to my iTunes folder and not erasing them later!  As a result it quickly uses up many gigabytes of hard disk space. It uses up 8 to 10 gigabytes in just a few days.  I have been using iTunes since its inception, and only had this occur in the past few weeks.  My iTunes library is large with 3187 albums, and is 425 GB in size. My iTunes library is located on remote hard disk and accessed from my wifi network.  I have had such a setup for many years without any problems. Any help would be appreciated.

    iTunes 10.5.2 on my macbook pro is writing a lot of temp(number).tmp files to my iTunes folder and not erasing them later!
    Usually, that indicates that something is interfering with read/writes to the iTunes library files. Do you have security software (or realtime backup utilities) installed that might be scanning the locations on the computer where the iTunes library files are stored?

  • Photoshop CS6 keeps crashing. I am using a brand new IMAC, I have 16GB RAM recently updated as it was running slow with 8GB and lots of hardrive space. When it crashes, i lose all my presents and it changes my preferences, it also fails to save or produce

    Photoshop CS6 keeps crashing. I am using a brand new IMAC, I have 16GB RAM recently updated as it was running slow with 8GB and lots of hardrive space. When it crashes, i lose all my presents and it changes my preferences, it also fails to save or produce a recovered file despite settings asking it to do so every 5 mins now. When i try to report the problem, it says it has found an issue and gives me a link to a solution....but wont let me click on the link.... PLEASE HELP! It's killing my productivity.

    If the crash started right after you added RAM, it could be a bad Ram dimm. You can try this - change the amount of RAM in Photoshop to 4G, this should stop Photoshop from using the higher ram. If it doesn't crash, it's probably the ram. Or run a diagnostic app. You don't say when it crashes, what you're doing when it crashes - it there a pattern? Did it ever work on this computer? Did it work on your previous computer? Without a lot of data, it could be related to the new computer... What OS version? Did you recently update it? Have you updated Photoshop to the most recent update?
    Do you have any plug-ins loaded? Try restarting Photoshop, and immediately press & hold the shfit key to turn off plug-ins.

  • Does Spotlight use a lot of disk space?

    I'm new to Macs — in fact, my first one hasn't arrived yet — and I'm wondering if Spotlight will tie up a lot of disk space? I'm getting a MacBook Pro with a 100GB drive (modest by desktop standards), and I've noticed that Windows search products (e.g., Google Desktop, MSN Desktop) can create 3-5 GB of data after indexing even a modest 30GB hard drive. If Spotlight is going to "waste" gigs of space on my limited laptop drive, I might look into disabling it. Thanks.

    Do not worry about it. On my book disk (100Gb with 60Gb occupied) spotlight uses the following space:
    big:~ mtsouk$ ls -l /.Spotlight-V100/
    total 278972
    -rw------- 1 root admin 219443200 Apr 15 07:23 ContentIndex.db
    -rw------- 1 root admin 238 Feb 28 18:56 _IndexPolicy.plist
    -rw------- 1 root admin 304 Apr 3 23:42 _exclusions.plist
    -rw------- 1 root admin 378 May 28 2005 _rules.plist
    -rw------- 1 root admin 66211840 Apr 15 07:23 store.db
    big:~ mtsouk$
    Mihalis.
    Dual G5 @ 2GHz   Mac OS X (10.4.6)  

  • Query on  V$STREAMS_APPLY_COORDINATOR used large temp space

    Hi
    My database recently experience ORA-1652 error consistently on temp tablespace. I found out the query to cause this was an OEM query SELECT APPLY_NAME,TOTAL_RECEIVED,TOTAL_ASSIGNED,TOTAL_APPLIED FROM V$STREAMS_APPLY_COORDINATOR, which uses over than 800M temp space frequently. I am not sure why is this, I can query the same select statement in sqlplus, it returns immeidatly. Can anyone help to teach me on this? Thanks.
    The query to find the user for temp tablespace is.
    SELECT S.sid || ',' || S.serial# sid_serial, S.username, Q.hash_value, Q.sql_text,
    T.blocks * TBS.block_size / 1024 / 1024 mb_used, T.tablespace
    FROM v\$sort_usage T, v\$session S, v\$sqlarea Q, dba_tablespaces TBS
    WHERE T.session_addr = S.saddr
    AND T.sqladdr = Q.address
    AND T.tablespace = TBS.tablespace_name
    ORDER BY mb_used)
    where mb_used >=800;
    I got
    SID_SERIAL USERNAME HASH_VALUE SQL_TEXT MB_USED TABLESPACE
    1626,1 DBSNMP 3741683138 /* OracleOEM */ SELECT APPLY_NAME,TOTAL_RECEIVED,TOTAL_ASSIGNED,TOTAL_APPLIED FROM V$STREAMS_APPLY_COORDINATOR 880 TEMP1

    Hi
    My database recently experience ORA-1652 error consistently on temp tablespace. I found out the query to cause this was an OEM query SELECT APPLY_NAME,TOTAL_RECEIVED,TOTAL_ASSIGNED,TOTAL_APPLIED FROM V$STREAMS_APPLY_COORDINATOR, which uses over than 800M temp space frequently. I am not sure why is this, I can query the same select statement in sqlplus, it returns immeidatly. Can anyone help to teach me on this? Thanks.
    The query to find the user for temp tablespace is.
    SELECT S.sid || ',' || S.serial# sid_serial, S.username, Q.hash_value, Q.sql_text,
    T.blocks * TBS.block_size / 1024 / 1024 mb_used, T.tablespace
    FROM v\$sort_usage T, v\$session S, v\$sqlarea Q, dba_tablespaces TBS
    WHERE T.session_addr = S.saddr
    AND T.sqladdr = Q.address
    AND T.tablespace = TBS.tablespace_name
    ORDER BY mb_used)
    where mb_used >=800;
    I got
    SID_SERIAL USERNAME HASH_VALUE SQL_TEXT MB_USED TABLESPACE
    1626,1 DBSNMP 3741683138 /* OracleOEM */ SELECT APPLY_NAME,TOTAL_RECEIVED,TOTAL_ASSIGNED,TOTAL_APPLIED FROM V$STREAMS_APPLY_COORDINATOR 880 TEMP1

  • Temp space problem

    HI all,
    I receive an error while executing a procedure.
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    can any one please exlain what is the problem.
    thanks in advance
    baskar k

    hi
    First ORA-01652 may occur because there is simply no space available in the temp tablespace of which is being used. The second cause of ORA-01652 may have to do with the local temp segment not being able to extent space even though there is space in other instances.
    To trouble shoot for ORA-01652, and find out which of the above scenarios are causing ORA-01652 use this query offered by MetaLink:
    select sum(free_blocks)
    from gv$sort_segment
    where tablespace_name = '<TEMP TABLESPACE NAME>'
    You will know that the first scenario is causing ORA-01652 to be thrown if the free block reads '0' because it signifies that there is no free space.
    If there is a good amount of space, you know that there is another cause for ORA-01652, and it is probably the second scenario. It is important to note that in a non-RAC environment, local instances are not able to extend the temp segments, so in the RAC environment, ORA-01652 has to be handled differently. If you are experiencing ORA-01652 in a non-RA environment, be aware that every SQL making use of the tablespace can fail.
    In RAC, more sort segment space can be used from other instances, which can help resolve ORA-01652 more easily. Try using the query below:
    select inst_id, tablespace_name, total_blocks, used_blocks, free_blocks
    from gv$sort_segment;
    Basically, you can then find out how much temp segment space can be used for each instance by viewing the total_blocks, and the used_blocks can reveal the space which has been used so far, and and the free_blocks gives the amount of space allocated to this particular instance. This being, to resolve ORA-01652, you can check out that used_blocks = total_blocks and free_blocks = 0 will probably show for the instance, and ORA-01652 will be shown multiple times within the alert log.
    This basically means that free space from other instances is being requested, and typically signifies that there is instance contention. Instance contention within the temporary space can make the instance take more time to process.
    In sever cases, a slowdown may occur, in which you might want try one of the following work-arounds:
    Increase size of the temp tablespace
    Increase sort_area_size and/or pga_aggregate_target
    However, remember to not use the RAC feature of DEFAULT temp space.
    If ORA-01652 is causing the slowdown, SMON will probably not be able to process the sort segment requests, you you should try to diagnose the contention:
    Output from the following query periodically during the problem:
    select inst_id, tablespace_name, total_blocks, used_blocks, free_blocks
    from gv$sort_segment;
    Global hanganalyze and systemstate dumps
    Hope this helps
    CHeers

  • Consuming too much temp space

    Dear All
    A technical colleague of mine is executing a procedure which selects data from two databases and inserts it into the third one. The procedure is not new and he has been executing the same since a year now.However in past two weeks the procedure is either consuming too much amount of time ( 3-4 hours as against 10-12 mins ) or it fails as it utilises more amount of temp space on the database on which insertions are made. In the temporary tablespace i added about 10gb more but it is still not suffice for the procedure to execute successfully.The sga for the database onto which insertion is done is 2560M and pga for the same is 2G.
    Please suggest what is to be done as it is an extremely crucial procedure.
    Thanks in advance.
    Regards
    rdxdba

    If you have Diagnostic Pack licence try to use AWR to compare instance activity for this procedure execution. If not try to install Statspack.
    I recommend also to use SQL trace to have trace data for a "good" execution and for a "bad" execution and to compare TKPROF output for related trace files.
    If you are using Oracle 10 or 11 try to use DMBS_MONITOR as described in http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php.

  • Oracle.sql.BLOB.freeTemporary() is not freeing TEMP space in the database

    Hi Folks,
    We are using oracle.sql.BLOB to store some file information into the database.
    Allocation of the temp space is done as below
    BLOB blob=BLOB.createTemporary(conn, false, BLOB.DURATION_SESSION); // this results in the usage of TEMP space from database
    And subsequent release is done as below
    blob.freeTemporary(); // this should have release the space from the database.
    This is on Oracle 10g, Java 1.6, ojdbc6.jar There are no exceptions. Even a simple program results in the same.
    Anybody faced something similar? Any pointers would be really appreciated.
    Thanks,
    Deva
    Edited by: user10728663 on Oct 11, 2011 5:33 AM

    Thanks a lot for the information.
    Memory is fine. And I am able to reproduce this within the scope of a simple example as well.
    Would you have any reference to the thread which had earlier reported this as a bug. I tried a reasonable amount of search in the forum, but no success.
    Thanks very much for any pointers.

Maybe you are looking for

  • FBL5N: Sales Order & Item columns

    Hi, The FBL5N report contains Sales Order and Item fields from the hidden columns.  However, there is no data when they are selected to be displayed. How are these fields populated? How can the SO and items be displayed in these columns? Thanks!

  • Check for Company Code & Vendor Relation ship before a PO is saved

    Scenario ,: If the Vendor doesn’t belong to the same CoCd as SAP accepts in this stage the PR/PO , the problem will not appear at this stage og MIGO  but will appear after the goods have been received and then it will appear when we want to enter the

  • Cannot open adobe bridge from cs6

    cannot open adobe bridge from cs6

  • P67A-GD65 Standby issue

    Hi, I've noticed that when I go to the menu to shut down on Windows, there's not an option for Standby, and if I hit the Standby button on my keyboard, it just turns off power completely. Is there no standby option for this motherboard?    It's quite

  • Transportation Planning Auto Leg Execution

    G'day all When re-planning a Shipment by clicking on the "Planning" status in the deadline tab, a pop-up window to propose the action "Execute leg determination again?" with an empty check box appears. How can I force the check box to be ticked by de