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

Thread: Order by

  1. #1
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865

    Order by

    I know this is very optimistic question but just want to check i have any luck.

    In our client ware house, there is a query running on 115 million rows table doing order by 29 columns. As we have a limited pga_aggregate_target (6G) this sort is going to TEMP table space and is consuming lot of time. The query in this example is run for 9 hours.

    The query is like this ...

    select
    col 1,
    col 2, ....
    col x
    from table order by
    col 1 ...
    col 29

    Just trying to find is there any work around available to get rid of order by on such a big table.

    Your suggestions are highly appreciated.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by vnktummala View Post
    Just trying to find is there any work around available to get rid of order by on such a big table.
    Does the business needs the returned dataset to be ordered?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Yes Paul, you are right.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

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