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

Thread: Order by performance issue

  1. #1
    Join Date
    Nov 2005
    Posts
    10

    Order by performance issue

    I have a table with 3 lac rows,
    I need to select all rows from this table for my application.

    Normal query w/o order by runs fine but
    when used w/ an order by clause gives an error
    Ora:01652 insufficient space in tablespace TS_NAME.

    Someone Please advice.

  2. #2
    Join Date
    Mar 2002
    Posts
    534

  3. #3
    Join Date
    Nov 2005
    Posts
    10
    thanks for the help mike9.

    I created an index on the order by column,
    and did not recieve any error.

    Is this the right thing to do or any other solution you can suggest.

  4. #4
    Join Date
    Mar 2002
    Posts
    534
    with the few information I got it's hard to say if it is the best solution.

    Would be interessting to see the queries, their explain plan, the version of Oracle you are using and the kind of application. Also it would be interessting to know the size of your sort_area_size or pga_aggregate_target and the size of your temp tablespace.

  5. #5
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650
    Quote Originally Posted by fighter
    thanks for the help mike9.

    I created an index on the order by column,
    and did not recieve any error.

    Is this the right thing to do or any other solution you can suggest.
    when you give order by on such a table it needs temp tablespace space to sort the data according to your query to give you the required result set. When it does not have the required space it gave the ora error 1652.

    do the kind of R&D and know do you really need the index? does it give you the time benefit?
    "What is past is PROLOGUE"

  6. #6
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Also remember that adding new index may break or make other queries to run slow or fast.

    You need to test the appln one more time.

    Tamil

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