Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do i know if my query using SORT_AREA_SIZE or temporary tablespace ?

GTS (DBA)Jul 19 2013 — edited Jul 22 2013

Good Morning  Everyone !

My DB version is 10.2.0.1

I have large table  exactly 3 million records.

SQL> select count(*) from tab1;

COUNT(*)

  ----------

   300000

SQL> select * from tab1 order by no DESC;

sorting  ... in process

300000 rows selected.

in Terminal 2 : I tried to find  sorting details -   ( No rows  selected - why ? )

SQL> select USERNAME , USER , TABLESPACE , SQL_ID from v$tempseg_usage  ;

no rows selected

SQL> /

no rows selected

When i google i have seen this ;

If  Oracle cannot do the sort in memory  (SORT_AREA_SIZE initialisation parameter), space will be allocated in a temporary tablespace for doing the sort operation.

REF_LINK : TEMPORARY Tablespaces and TEMPFILES | Oracle FAQ


MY DOUBT QUESTION :   How do i know if my query using  SORT_AREA_SIZE   or temporary tablespace ?


Thanks in advance.



Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2013
Added on Jul 19 2013
6 comments
1,468 views