Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 553211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:34:53+00:00 2026-05-13T11:34:53+00:00

Can someone look at the linked reference and explain to me the precise statements

  • 0

Can someone look at the linked reference and explain to me the precise statements to run?

Oracle DBA’s Guide: Creating a Large Index

Here’s what I came up with…

CREATE TEMPORARY TABLESPACE ts_tmp 
TEMPFILE 'E:\temp01.dbf' SIZE 10000M 
REUSE AUTOEXTEND ON EXTENT MANAGEMENT LOCAL;

ALTER USER me TEMPORARY TABLESPACE ts_tmp;

CREATE UNIQUE INDEX big_table_idx ON big_table ( record_id );

DROP TABLESPACE ts_tmp;

Edit 1

After this index was created, I ran an explain plan for a simple query and get this error:

ORA-00959: tablespace 'TS_TMP' does not exist

It seems like it’s not temporary at all… 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:34:53+00:00Added an answer on May 13, 2026 at 11:34 am
    CREATE TEMPORARY TABLESPACE ts_tmp 
    TEMPFILE 'E:\temp01.dbf' SIZE 10000M 
    REUSE AUTOEXTEND ON EXTENT MANAGEMENT LOCAL;
    

    This creates a temporary tablespace (an area on disk where the intermediate sort results will be stored). An index is a sorted set of data, and sorting needs lots of space.

    “Temporary” here means that the data that is stored is temporary by nature, not that the tablespace itself is temporary. Think of it like of /tmp directory in Unix or %TEMP% folded in Windows : the directory / folder itself is permanent, but the data stored within it are temporary.

    REUSE means do not fail if the file already exists (usually used when the filename points to a raw device, like unformatted disk partition, to avoid OS file management overhead). Instead, it will just open the file for writing and fill it with the new data. If not for this clause, the command would fail if the file with the given name existed.

    AUTOEXTEND ON means “grow the file if required”. If you set it to off and 10Gb will be not enough for the sorting operation, the tablespace will not automatically grow, and the operation will fail.

    EXTENT MANAGEMENT LOCAL means that the tablespace layout is stored in the tablespace itself (not in the system tables). Not sure about 11g, but in previous versions of Oracle this option was not available for temporary tablespaces.

    ALTER USER me TEMPORARY TABLESPACE ts_tmp;
    

    This makes the user me to use the newly created temp tablespace as a temporary storage medium

    CREATE UNIQUE INDEX big_table_idx ON big_table ( record_id );
    

    This just creates the index.

    DROP TABLESPACE ts_tmp;
    

    This drops the temporary tablespace.

    Before running the script, figure out the current default tablespace:

    SELECT  temporary_tablespace
    FROM    dba_users
    WHERE   username = 'ME'
    

    Most probably, it will return TEMP.

    Before dropping ts_tmp, revert the default temp tablespace for the user:

    ALTER USER me TEMPORARY TABLESPACE temp; -- or whatever the previous query returned.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 303k
  • Answers 303k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use Google Maps API for reverse geocoding. Check… May 13, 2026 at 8:38 pm
  • Editorial Team
    Editorial Team added an answer This problem went away when I recast the taglib declarations… May 13, 2026 at 8:38 pm
  • Editorial Team
    Editorial Team added an answer The code works almost well, but is changes each <img>… May 13, 2026 at 8:38 pm

Related Questions

Follow up question to: This question As described in the linked question, we have
I'm using a Vote model which can be generically linked to several different models
I'm looking at making some mobile apps in my spare time and I want
I'm working on a silverlight application where I'm checking the url to see if
I need help, I need to make a menu that only shows when you

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.