DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Data file vs. Temp file creation

  1. #1
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204

    Data file vs. Temp file creation

    Why is temp file creation and extension so much faster than data file creation? Is there additional validation going on?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  2. #2
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Temp files are sparse in nature oracle will not format the blocks thats why even if you create a 10gb tempfile its fast.

    For datafile oracle has to format the blocks and that takes time.

    regards
    Hrishy

  3. #3
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Thank you, that makes perfect sense.
    Cheers,
    Ken
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  4. #4
    Join Date
    Aug 2007
    Location
    Cyberjaya,kuala lumpur
    Posts
    340
    Locally managed temporary tablespaces have temporary datafiles (tempfiles), which are similar to ordinary datafiles except that:
    - You cannot create a tempfile with the ALTER DATABASE statement.
    - You cannot rename a tempfile or set it to read-only.
    - Tempfiles are always set to NOLOGGING mode.
    - When you create or resize tempfiles, they are not always guaranteed allocation of disk space for the file size specified. On certain file systems (for example, UNIX) disk blocks are allocated not at file creation or resizing, but before the blocks are accessed.
    - Tempfile information is shown in the dictionary view DBA_TEMP_FILES and the dynamic performance view V$TEMPFILE, but not in DBA_DATA_FILES or the V$DATAFILE view.


    Note: this arrangement enables fast tempfile creation and resizing; however, the disk could run of space later when the tempfiles are accessed.

  5. #5
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Thanks for the additional details.

    It appears that when a tempfile is created, it just lays down a bof and an eof marker on the specified storage.

    It also appears that when a datafile is created, write I/O's are intense. It makes sense that it would be walking through the storage to get every block's physical address.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width