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

Thread: sort

  1. #1
    Join Date
    Jun 2001
    Posts
    193
    i know order by will use sort_area.

    but what if i have a index on that column?

    create table test(a int,b int);
    insert to test some values.

    select * from test where a>10;

    does this one use sort_area?
    guru is on the way!!!!

  2. #2
    Join Date
    Mar 2001
    Posts
    314
    Where is the ORDER BY clause?

    -amar

  3. #3
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    if you have an index on a, you'll issue a RANGE SCAN, but no data will be sorted since, as amar said, you never specify that you want something to be ordered ...

  4. #4
    Join Date
    Jun 2001
    Posts
    193
    sorry. it should be
    select * from test where a>10 order by a ;

    guru is on the way!!!!

  5. #5
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Most likely not, but it depends on whether or not the index is used.

    Check the plan for the statement. If there is no SORT step, then sort_area will not be used.

    - Chris

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