Size for TEMP tablespace

I don't know if this is a "valid" question. We have users running reports on our production system. The sometimes complain about the temp space being too small (due to their queries crashing when using too much temp space).
But I also have a feeling that you can keep throwing disks at TEMP space, and that it will never be enough.
What should the size of a database's TEMP space be - is there a rule of thumb for this ?
Dirk

There are several considerations that you should take into account when you try to size your temporary tablespace:
First, how much sort does you average transaction need and how many concurrent transactions does your system need to support. This number gives you a starting point for the minimum workable size for normal operations.
Now, how big is the largest table on your system and do you wish to be able to support select * from biggest order by ? Supporting an unqualified select on your largest table may not be required.
How big is the largest index in your system? It is likely that you need to have enough temp space available to recreate this index in the event of corruption without having to take special action to allocate more space to temp on a temporary basis. But having to add space in the event of a diaster might be acceptable.
Figure out what the largest sort operation you need to be able to support is and then add enough space to handle the number of concurrent average transactions that would be expected to be on the system at the same time. This is the size you should use for your temporary tablespace.
It is better to have all the space you will need for any normal and for any maintenance operation available at all time rather than trying to find additional file space to support special maintenance tasks or diaster recovery operations.
HTH -- Mark D Powell --

Similar Messages

  • Optimal size for TEMP tablespace tempfiles

    Hi all,
    I've rumaged through Oracle documentation on the above topic but can't find the answer I'm seeking:
    How do you determine the optimal size for your tempfiles? Are there rules to guide one in this area? For example for a 50G database, how do you determine if it's 2G, 3G or 4G that's best for the database? What about a 500G database?
    Anwers will be appreciated.
    Regards

    It's the size of the sets, as you say. And in a data warehouse, the data sets can be very large. I'd say that in an OLTP database, then the useage of temp would (should) be low; but in a data warehouse, all bets are off: one-off end of month runs; director wants a monolithic report running; all that sort of DWH-related type of processing, which, by its nature, happens all the time. Similarly, a large number of users (e.g. users of, say, a Third Party BI tool) amy lead to lots of big sorts, owing to the ad hoc nature of their queries. Standard DWH stuff.
    I don't often see tiddly-widdly bits of SQL in data warehouses, like your SELECT COUNT(*) FROM tab$ example. It could be done, sure, but more likely will be bit, fat queries, which a DWH is designed to deal with. And a lot of temp may be required.
    From that 6-years old (but relevant) article (my emphasis): "For example, if you join two *large* tables, and Oracle cannot do the sort in memory (see SORT_AREA_SIZE initialisation parameter), *space will be allocated in a temporary tablespace for doing the sort operation*."
    Regards - Don Lewis

  • Determining datafile size for temp tablespace

    Is there a rule of thumb for determining the size of the temporary tablespace, or at least a common starting value?
    -Thanks
    Chuck

    Rule of thumb ... trial and error.
    That is what your test environment is for.
    We have over 200 databases with TEMP ranging from 50Mb up to 56Gb. So go figure!!!

  • Storage parameter for Temp tablespace

    Hi all,
    Greetings of the day...
    DB version is 10.2.0.4 ..Size of db is 550gb and in that temp tablespace is 40gb... daily and frequently we used to unable to extent temp segments...Saw the storage parameters of temp segments it has only 'EXTENT MANAGEMENT LOCAL UNIFORM SIZE 16777216'
    Please suggest as how to define storage parameters for temp tablespace...Am able to find the query which uses temp segments...Just needed to know abt the storage parameters for it..
    thanks,
    baskar.l

    CREATE TEMPORARY TABLESPACE TEMP TEMPFILE
    '/u02/TSTLOG/temp01.dbf' SIZE 15360M AUTOEXTEND ON NEXT 100M MAXSIZE 32767M
    TABLESPACE GROUP ''
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
    Hope this will work.
    Regards
    Asif Kabir

  • To shrink the size of TEMP tablespace

    Dear all,
    There is a databse with RAC, now in OEM the size of TEMP tablespace has been reached at 99.9%. now we want to shrink the size of TEMP tablespace.
    how to we do that???????
    plz help me...........

    Temporary tablespaces usually show they are full, however this space is not actually in use. It is rather allocated. Oracle has evaluated the best way to obtain the most of performance, and he said it is better to allocate once than allocate-deallocate-reallocate extents, so temporary space is not 'released'.
    If you want to feel psychologically more confortable with lower allocated space, you can drop your tablespace (create an interim default temporary tablespace first) and recreate it.
    You can also rebuild temporary datafiles:
    alter tablespace temp add tempfile 'C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.dbf' size 32m;
    SQL> select name from v$tempfile;
    NAME
    C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP.DBF
    C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.DBF
    SQL> alter database tempfile 'C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.DBF' drop including datafiles;
    Database altered.

  • Maxsize 0 after autoextend turned off for Temp tablespace!

    Hi,
    DB:11.1.0.7
    We had earlier the tempfiles with maxszie unlimited as below:
    select FILE_NAME,TABLESPACE_NAME,BYTES/(1024*1024) "Size",MAXBYTES/(1024*1024) "Maxsize",AUTOEXTENSIBLE from dba_temp_files;
    February 10, 2011 Tablespace used by DEV database
    ===================================
    FILE_NAME
    TABLESPACE_NAME Size Maxsize AUT
    /oradata/DEV/temp01.dbf
    TEMP 1024 32767.9844 YES
    /oradata/DEV/temp02.dbf
    TEMP 1024 32767.9844 YES
    /oradata/DEV/temp03.dbf
    TEMP 3072 32767.9844 YES
    Now after turning autoextend off, why maxsize is showing as '0' instead of being at unlimited as earlier?
    Please see below:
    select FILE_NAME,TABLESPACE_NAME,BYTES/(1024*1024) "Size",MAXBYTES/(1024*1024) "Maxsize",AUTOEXTENSIBLE from dba_temp_files;
    February 10, 2011 Tablespace used by DEV database
    ===================================
    FILE_NAME
    TABLESPACE_NAME Size Maxsize AUT
    /oradata/DEV/temp01.dbf
    TEMP 1024 0 NO
    /oradata/DEV/temp02.dbf
    TEMP 1024 0 NO
    /oradata/DEV/temp03.dbf
    TEMP 3072 0 NO
    Could anyone please explain?
    Thanks for your time!
    Regards,

    Handle:      user10088255
    Status Level:      Newbie
    Registered:      Mar 4, 2009
    Total Posts:      87
    Total Questions:      62 (62 unresolved)
    so many questions without ANY answers.
    http://forums.oracle.com/forums/ann.jspa?annID=718

  • INCLUDED_IN_DATABASE_BACKUP for temporary tablespace

    Hi,
    The query output from v$tablespace shows the INCLUDED_IN_DATABASE_BACKUP value for temp tablespace in my db is "YES". The only way to have the value "NO" is to configure rman to exclude tbs. But you can not exclude temporary tablespace. Based on the size of total full backup files, the temp tablespace does not seem to be backup by rman. Is this a bug or is there other way to set this value for temporary tablespace to "NO"? I'm using 9iR2. Thanks.

    >...The only way to have the value "NO" is to configure rman to exclude tbs. But you can not exclude temporary tablespace.
    RMAN doesn't include the temporary tablespace in the backups.
    SQL> select * from v$tablespace;
           TS# NAME                           INC
             0 SYSTEM                         YES
             7 TEST                           YES
             3 USERS                          YES
            4 TEMP YES
             6 UNDO                           YES
    RMAN> list backup of tablespace TEMP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 01/26/2006 20:04:06
    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20202: tablespace not found in the recovery catalog
    RMAN-06019: could not translate tablespace name "TEMP"
    RMAN> list backup of tablespace UNDO summary;
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time #Pieces #Copies Tag
    3125    B  0  A DISK        22-JUL-05       1       1       TAG20050722T102731
    3207    B  0  A DISK        24-OCT-05       1       1       TAG20051024T163622
    3248    B  1  A DISK        02-NOV-05       1       1       TAG20051102T225318
    3360    B  F  A DISK        23-JAN-06       1       1       TAG20060123T172135Aron

  • Temp tablespace 99%full

    What are the suggestion for temp tablespace, if its 99%full, should we keep adding space in it or it will use existing space?
    TABLESPACE TOTAL_MB USED_MB FREE_MB PCT_USED GRAPH (X=5%)
    TEMP 17,500.00 17,444.00 56.00 99.68 [XXXXXXXXXXXXXXXXXXX-]

    Hi,
    >>What are the suggestion for temp tablespace, if its 99%full, should we keep adding space in it or it will use existing space?
    I think that you don't need worry about, unless you're receiving some ORA- error about out of space in TEMP tablespace. You can see below an SQL output from a database used here in my company for development and tests purposes. The database is up uninterruptedly by 7 months and the space size for the TEMP tablespace have been configured to use 900 MB.
    LEGATTI@ORACLE10> SELECT tablespace_name, SUM(bytes_used), SUM(bytes_free)
      2  FROM   V$temp_space_header
      3  GROUP  BY tablespace_name;
    TABLESPACE_NAME                SUM(BYTES_USED) SUM(BYTES_FREE)
    TEMP                                 943718400               0Cheers
    Legatti

  • Oracle 9i TEMP tablespace backup problem using RMAN!

    Oracle8/8i whole backup is ok for our backup software(using RMAN without RC database), but for Oracle 9i, I get following error messages when backing up temp tablespace.
    1. RMAN-20202: tablespace not found in the recovery catalog
    2. RMAN-06019: could not translate tablespace name "TEMP"
    I check some views of Oracle9i, and know some changes happen for temp tablespace in 9i, but how to deal with this problem. Any idea, please!

    In 9i RMAN does not restore temporary datafiles. Instead, you should create them after your restore. I believe that Oracle is going to make a change to this in the next release of 9i and have RMAN create the temporary files. You can view the temporary datafiles @ v$tempfile.
    I believe RMAN doesn't restore temporary files because they are locally managed and not in the control files. RMAN reads the controlfile of the target database to obtain info about backups, datafiles, etc.
    Hope this helps.

  • Setting the size of a tablespace prior to its creation

    Hi guys,
    Oracle version: 10.2.0.x
    OS: Windows 32bit
    I was wondering if there are any 'conditions' in setting the intial size of a tablespace prior to its creation. This is because, one of our customers wants to export and import from one schema into another but set an initial size for a tablespace during its creation and prior to importing data into it, but we have a database wizard tool that creates the accounts/schemas by using the following underlying sql:-
    CRETE TABLESPACE <tbl_name> datafile <path><datafile_name>.dbf SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE 32000M DEFAULT STORAGE (INITIAL 256 NEXT 256K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0) ONLINE;
    Under normal circumstances, what he would do is to use our wizard tool and create an account and then import data from an export dump.
    But he wants to create a tablespace using a SQL something like:-
    CRETE TABLESPACE <tbl_name> datafile <path><datafile_name>.dbf SIZE 2000M AUTOEXTEND ON NEXT 500M MAXSIZE 32000M DEFAULT STORAGE (INITIAL 256 NEXT 256K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0) ONLINE;
    He thinks this should be ok because his export dump would be on size 2GB and would want to import all of that 'at once' i.e. without actually using autoextend feature for the first 2GB.
    Does this make any sense? Do you guys see any difference 'performance-wise' between the 2 create tablespace statements?
    I think the second sql (with size 2000M initially) seems to be a more logical approach but I am not really sure of the implications going down the line performance-wise.
    Any help/input much appreciated!
    Thanks guys

    1) Provide the facility in your tool to change the default size of datafiles and keep autoextend off.You won't believe it...we had this option in a previous version but now it isn't there anymore!
    But why turning off AUTOEXTEND? I mean, our customers are not meant to modify anything in the database other than via using our software, hence we would want our customers to just use the software as it is but have their DBAs monitor the growth of any datafiles etc...
    2) Let your tool do what it is doing and then manually increasing the size of the datafiles and making autoextend off once you have created the tablespace and before doing import. This can be done by your tool or loggin to the database.We could do this, but we don't want our customers to manually finger the database as they are/might not be Oracle-efficient and wouldn't want production systems to crash for the same reason.
    Hence we could just give them the SQL to be replaced with the 'default' one and then create a tablespace via the tool which would create a tablespace with an initial size of 2GB+ and with greater autoextend facility (such as autoextend on 500M) rather than 100M so that there are fewer autoextends.
    Also, in your point 2, are you saying to turn off autoextend only for the import and set it back on by alter tablespace....?
    Thank you.

  • Maximun size for  a datafile

    Hi,
    Oracle Version :10.2.0.1
    Operating system:Linux
    Can any please tell me what is the maximum size that a datafile can grow and the maximum size for tablespace.
    Here i am having one tablespace which is having 4 datafile in that 2 datafile are 33 gb and the other 2 datafile size are 1gb and 400 mb.But in my OEM it is showing that your tablespace ECA_DATA is 88 percent full.
    I think there is no maximum size for the tablespace but why it is how it is showing the my tablespace is 88 percent full.

    Hi,
    Here is the output of the query which you have given.Can you pleas tell me what is the
    FILE_ID|FILE_NAME|ALLOCATED|USED|FREE
    1|/u02/oradata/eca/system01.dbf|901775360|894435328|7274496
    2|/u02/oradata/eca/undotbs01.dbf|4881121280|47841280|4833214464
    3|/u02/oradata/eca/sysaux01.dbf|713031680|698744832|14221312
    4|/u02/oradata/eca/users01.dbf|13851688960|595197952|13256425472
    5|/u03/oradata/eca/ECAPROD_01.dbf|131072||65536
    6|/u03/oradata/eca/ECA_DATA_01.dbf|34358951936|31995723776|2363097088
    7|/u02/oradata/eca/ECA_INDX_01.dbf|17028874240|6012272640|11016536064
    8|/u02/oradata/eca/ECAUAT_01.dbf|104857600||104792064
    9|/u02/oradata/eca/ECAPREPROD|106496||65536
    10|/u02/oradata/eca/ECA_DATA2|34358951936|33730527232|628293632
    11|/u02/oradata/eca/ecadump.dbf|12582912||12517376
    12|/u02/oradata/eca/ecaread.dbf|18517721088|12014845952|6502809600
    13|/u03/oradata/eca_80504.dbf|104857600||104792064
    14|/u03/oradata/eca_80505.dbf|104857600||104792064
    15|/u03/oradata/ECAVAPDL.dbf|104857600|4784128|100007936
    16|/u02/oradata/eca/ECA_DATA3|1048576000|1048313856|196608
    17|/u02/oradata/eca/ecadump1.dbf|419430400||419364864
    18|/u02/oradata/eca/ECA_DATA3.dbf|419430400|419364864|
    19|/u02/oradata/eca/CKM_PROD_P2.dbf|11943804928|11925979136|17760256
    20|/u02/oradata/eca/CKM_PROD_p3.dbf|12575178752|12431785984|143327232
    21|/u02/oradata/eca/CKM_PROD_p4.dbf|13187809280|13187743744|Here my tablespace ECA_DATA contains datafile are
    FILE_ID|FILE_NAME|ALLOCATED|USED|FREE
    6|/u03/oradata/eca/ECA_DATA_01.dbf|34358951936|31995723776|2363097088
    10|/u02/oradata/eca/ECA_DATA2|34358951936|33730527232|628293632
    16|/u02/oradata/eca/ECA_DATA3|1048576000|1048313856|196608
    18|/u02/oradata/eca/ECA_DATA3.dbf|419430400|419364864|Edited by: SIDDABATHUNI on Nov 30, 2009 2:29 AM

  • Maximum Temp tablespace size you've seen

    DB version: 10.2.0.4
    Our DB caters a retail application . Total DB Size of 3TB. Its is a bit of mix of both OLTP and Batch processing environment.
    Our temp tablespace has 1 file and we had set the tempfile as AUTOEXTEND. Somehow its size has reached 25GB now !
    We don't actually need this. Do we?
    For a fairly busy DB of around 3TB size, what is the maximum temp tablespace size you've ever seen?
    What is the maximum temp tablespace size you've ever seen for Big DB like Telecom, Banking?

    The point about temp space is that your requirements are dynamic - the actively used area shrinks and grows.
    Comparing apples with oranges, tempfile sizes on system where I am currently here amount to 50 GB but to be honest that's mainly due to a not insignificant number of pretty poor queries, run concurrently, with multipass operations, etc.
    Kellyn Pedersen had an example of a process using 720GB here:
    http://dbakevlar.com/?p=43
    Whilst 25GB may not be earth shattering, a "large" temp area may perhaps be an indicator that you want to review some of your application code.
    (What is "large"? "unusual" compared to what is "normal" for your system may be a better metric)
    If you're using automatic pga memory management, then there's a limit to what each session can get, it may be that automatic work areas are not suitable for some of your code and some manual sizing is required to prevent operations spilling unnecessarily.
    Also, inaccurate CBO estimates on your queries can lead to inaccurately sized work areas that then spill into temp.
    There was a reminder of this in one of Randolf Geist's articles on hash aggregation:
    http://oracle-randolf.blogspot.com/2011/01/hash-aggregation.html

  • What should be idea temp tablespace size ?

    HI all
    My databases size in between 20 gb to 100gb. waht factor should i consider to fix the temp tablespace size ?
    What should be my ideal temp tablespace size for the both database ?

    Arun Rao wrote:
    HI all
    My databases size in between 20 gb to 100gb. waht factor should i consider to fix the temp tablespace size ?
    What should be my ideal temp tablespace size for the both database ?what is the version?
    Temp size wont depends on database size, It purely depends on user sortings. Create the temporary tablespace with autoextend upto maxsize of 32gb approx & see how users performing sortings.
    >
    Handle:      Arun Rao
    Status Level:      Newbie
    Registered:      Jul 4, 2010
    Total Posts:      10
    Total Questions:      8 (7 unresolved)
    Name      Arun Rao
    Location      Mumbai
    Occupation      DBA
    >
    7 out of 8 unanswered, if already answered why cant you close those threads? Keep the forum clean.
    Edited by: CKPT on Jul 2, 2012 2:46 PM

  • TEMP datafiles for temporary tablespaces don't have same timestamp

    Hi,
    This is what I have done:
    Installing 10G2 on XP PRO with sample database.
    Tried to install Designer Repository with the Wizard, created a user for the toolkit, that failed.
    Added 1 temp tablespace size 20Meg from OEM console.
    Dropped cascade Toolkit schema owner and recreated it
    Tried to install Designer Repository, that failed again
    Added 1 temp tablespace size 1giga from OEM console, failed again to import
    Dropped cascade Toolkit schema owner and recreated it
    Tried to install Designer Repository, that failed again
    Gave up for now: I have located a doc about installing manually by running scripts, will do as soon as I feel at ease with OEM.
    Then I put the PC on snooze while database was up, crashed it.
    Stopped the services, checked the logs, restarted manually and slowly, base up.
    Now both extra TEMP datafiles are lagging behind, seen from Windows explorer, but the tablespaces are seen as online from oem, not seen from sqlplus dba_tablespaces view.
    So the question is:
    Are the TEMP datafiles supposed to stay in sync with the others or is it ok if they show timestamps dating three days back, provided there has not been any users transactions in the database?
    I checked the 10G2 DBA online doc, but I can't find where it's mentioned.
    Many thanks if you can help.

    Hi,
    Everything allright, they do show!
    I'm a bit wary about resizing anything, maybe you remember the resizing bug for SYSTEM tablespace in version 7?
    I have to beef up on DBA tricks.
    Since I also have a 1 Giga Users tablespace, I'll do some heavy Inserting and Updating and Sorting see if that tickles the Temps.
    Many thanks for your prompt reply.
    Message was edited by:
    JeanParis

  • Should I increase TEMP tablespace size here ?

    Version: 10.2.0.4
    Platform : RHEL 5.8
    Currently we are running a batch job in a schema. The default temporary tablespace for that schema is TEMP.
    But I see that the tablespace is full.
    SQL> select file_name, bytes/1024/1024/1024 gb from dba_temp_files where tablespace_name = 'TEMP';
    FILE_NAME                                                                 GB
    /prd/fdms/oradata_db18/fdmsc1sdb/oradata/ts_temp/temp01.dbf               10
    SQL> SELECT     TABLESPACE_NAME, FILE_ID,
            BYTES_USED/1024/1024,
            bytes_free/1024/1024
    FROM V$TEMP_SPACE_HEADER where tablespace_name = 'TEMP'  2    3    4  ;
    TABLESPACE_NAME                             FILE_ID BYTES_USED/1024/1024 BYTES_FREE/1024/1024
    TEMP                                              1                10240          
    So, far the application users have not complained and I didn't see any 'unable to extend' error in the alert log yet,  but the above scenario is dangerous. Right? I mean SQL statements with sorting can error out. Right ? Unlike UNDO, with temp tablespace, temp segments cannot be reused. Right ?

    Hello,
    As said previously, the Sort Segments can be reused, the Views V$SORT_SEGMENT and V$TEMPSEG_USAGE are relevant to monitore the usage of the Temporary Tablespace.
    You'll find in the Note below a way to control over time the Temporary Tablespace:
    How Can Temporary Segment Usage Be Monitored Over Time? [ID 364417.1]
    More over, you may also check for any ORA-01652 in the Alert Log.
    But don't worry to much to get a Full Temporary Tablespace, here "Full" doesn't mean "unreusable".
    Hope this help.
    Best Regards,
    Jean-Valentin Lubiez

Maybe you are looking for

  • Nic transfers out but can't receive packets.  Need (IRQ?) help.

    The other day, I was having trouble with an Intel board with an on board Realtek nic. (see http://forum.java.sun.com/thread.jspa?threadID=5282653&tstart=0) I'm having a similar problem now with a Gigabyte 8i865GME-775 with an Intel 8550 onboard nic.

  • Best Mobile Final Cut Pro Setup?

    I've been working on a DV project at home and need to continue editing it while I'm on a business trip for 4 weeks. All I'll be doing is sending quicktimes to my client for review. What's the best plan for editing in a hotel room? I have a Macbook Pr

  • Error Sql Loader  in prompt command

    Hi When I tried to execute loader from PROMPT WINDOWS sqlldr triton/en62ss63 control=ttiitm983501.ctl return me error   SQL*Loader-704: Erro interno: ulconnect: OCIServerAttach [0] ORA-12560: TNS:erro de adaptador de protocoloBut when I to execute fr

  • Problema de compatibilidad de adobe photodeluxe home edition 3.0 con windows xp

    Alguien me podria decir que puedo hacer para poder usar photodeluxe home edition en windows xp ya me he bajado los parches pero al ejecutarlos me dice que tampoco son compatibles os agradeceria vuestra respuesta. mi mail es [email protected] . respon

  • Audiobooks in Front Row

    Although I have many audiobooks in my itunes library, they are not listed in Front Row as audiobooks but as music between all the music artists. How is it possible to change this allocation?