0% found this document useful (0 votes)
77 views2 pages

SCRIPT - How To Determine The Number of Disk Sorts Vs Memory Sorts (Doc ID 100013.1)

Uploaded by

Nawab Sharief
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views2 pages

SCRIPT - How To Determine The Number of Disk Sorts Vs Memory Sorts (Doc ID 100013.1)

Uploaded by

Nawab Sharief
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

7/8/2021 Document 100013.

1
  Last Login: July 8, 2021 7:54 AM GST Nawab (Available) (0) Contact Us Help
PowerView is Off

 
Dashboard Knowledge Service Requests Patches & Updates

Give Feedback...
Copyright (c) 2021, Oracle. All rights reserved. Oracle Confidential.

SCRIPT: How to Determine the Number of Disk Sorts vs Memory Sorts (Doc ID 100013.1) To Bottom

Checked for relevance on 17-Dec-2007


    Was this document helpful?  
   

Abstract
Script to determine the Number of Disk Sorts vs. Memory Sorts.   Document Details  

 
Type:
SCRIPT
Status:
Product Name, Product Version Oracle Server, 7.3.x to 9.x PUBLISHED
Last Major
Aug 4, 2018
Update:
Mar 13, 2021
Platform Platform Independent Last Update:

Date Created 30-Apr-2001


   

    Related Products  

Instructions Oracle Database Backup


Service
Oracle Database Cloud Service
Execution Environment:
Oracle Database - Enterprise
<SQL, SQL*Plus, iSQL*Plus>
Edition
Oracle Database Cloud
Schema Service
Access Privileges:
Oracle Database Exadata
Requires DBA privileges.
Express Cloud Service
Show More
Usage:
   

sqlplus <user>/<pw> @[SCRIPTFILE]

  Information Centers  
Instructions:
Oracle Catalog: Service
Run the script from SQL*PLus connected as a user with DBA access privileges.
Request Data Collections
(SRDCs) for all Products and
PROOFREAD THIS SCRIPT BEFORE USING IT! Due to differences in the way text
Services [51.2]
editors, e-mail packages, and operating systems handle text formatting (spaces,
Oracle Catalog: Information
tabs, and carriage returns), this script may not be in an executable state
Centers for All Products and
when you first receive it. Check over the script to ensure that errors of
Services [50.2]
this type are corrected.

Platform as a Service (PaaS)


and Oracle Cloud
  Infrastructure (OCI)
Information Center
Description [2048297.2]

Index of Oracle Database


Many times a customer will want to know the number of memory sorts compared
Information Centers
to disk sorts. This information is useful in tuning database performance
[1568043.2]
and the SORT_AREA_SIZE. Information Center: Overview
Database Server/Client
By using information from V$STATNAME and V$SYSSTAT, a DBA can determine whether
Installation and
or not more sorts are being performed on disk than is desired. A large number
Upgrade/Migration
of disk sorts can adversely affect overall performance of the database. If
[1351022.2]
more disk sorts are being performed than desired, then increase the value of
Show More
SORT_AREA_SIZE. Any changes made to the SORT_AREA_SIZE parameter will have a
   

like effect on the size of the SGA. Measurements have shown that large sort

areas (over 10 Meg)do not perform much better than 1 Meg sort area unless a
  Document References  
disk sort is avoided altogether. No References available for
this document.
Sample Output
   

=============

'INIT.ORASORT_AREA_SIZE:'||VALUE
  Recently Viewed  
--------------------------------------------------------------------------------

INIT.ORA sort_area_size: 524288


Diagnosing and Resolving
Error ORA-04031 on the
Shared Pool or Other
Memory Pools [146599.1]
NAME VALUE

SCRIPT: Check the Large


---------------------------------------------------------------- ------------
Pool sizing when Parallel
sorts (memory) 448,726
Processing is in use and
sorts (disk) 0
ORA-4031 errors occur.
sorts (rows) 921,405
[1504173.1]
Oracle Database Automated
SGA Memory Tuning
 
[257643.1]
References SCRIPT: Size Shared Pool
using V$shared_pool_advice.
[255409.1]
<Note:102339.1> Temporary Segments: What Happens When a Sort Occurs
Alert Log Recommendation -
&quot;Increase per process
  memlock (soft) limit to at
least &lt;n&gt;MB to lock
Script &lt;n&gt;% of SHARED
GLOBAL AREA (SGA) pages
into physical memory&quot;
column value format 999,999,999
[2049901.1]
Show More
select 'INIT.ORA sort_area_size: '||value
   

from v$parameter

where name like 'sort_area_size'

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=351644559297916&id=100013.1&displayIndex=11&_afrWindowMode=0&_adf.ctrl-state… 1/2
7/8/2021 Document 100013.1
/

select a.name, value

from v$statname a, v$sysstat

where a.statistic# = v$sysstat.statistic#

and a.name in ('sorts (disk)', 'sorts (memory)', 'sorts (rows)')

 
 
Disclaimer

EXCEPT WHERE EXPRESSLY PROVIDED OTHERWISE, THE INFORMATION, SOFTWARE,

PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS. ORACLE EXPRESSLY DISCLAIMS

ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT

LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR

PURPOSE AND NON-INFRINGEMENT. ORACLE MAKES NO WARRANTY THAT: (A) THE RESULTS

THAT MAY BE OBTAINED FROM THE USE OF THE SOFTWARE WILL BE ACCURATE OR

RELIABLE; OR (B) THE INFORMATION, OR OTHER MATERIAL OBTAINED WILL MEET YOUR

EXPECTATIONS. ANY CONTENT, MATERIALS, INFORMATION OR SOFTWARE DOWNLOADED OR

OTHERWISE OBTAINED IS DONE AT YOUR OWN DISCRETION AND RISK. ORACLE SHALL HAVE

NO RESPONSIBILITY FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT

RESULTS FROM THE DOWNLOAD OF ANY CONTENT, MATERIALS, INFORMATION OR SOFTWARE.

ORACLE RESERVES THE RIGHT TO MAKE CHANGES OR UPDATES TO THE SOFTWARE AT ANY

TIME WITHOUT NOTICE.

 
Limitation of Liability

IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

SPECIAL OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE,

DATA OR USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN

CONTRACT OR TORT, ARISING FROM YOUR ACCESS TO, OR USE OF, THE SOFTWARE.

SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY.

ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.

 
 
Didn't find what you are looking for? Ask in Community...

Related
Products

Oracle Cloud > Oracle Platform Cloud > Oracle Database Backup Service > Oracle Database Backup Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Cloud Service
Oracle Database Products > Oracle Database Suite > Oracle Database > Oracle Database - Enterprise Edition > RDBMS > Tablespace Management, Tablespace Fragmentation,
Data files, ORA-03297, Oracle Managed Files (OMF)
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Cloud Schema Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Exadata Express Cloud Service
Oracle Cloud > Oracle Infrastructure Cloud > Oracle Cloud at Customer > Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine)
Oracle Cloud > Oracle Platform Cloud > Oracle Cloud Infrastructure - Database Service > Oracle Cloud Infrastructure - Database Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Cloud Exadata Service

Keywords
DBPERF; HLTH_CHK; RDA

Back to Top
 
Copyright (c) 2021, Oracle. All rights reserved. Legal Notices and Terms of Use Privacy Statement
   

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=351644559297916&id=100013.1&displayIndex=11&_afrWindowMode=0&_adf.ctrl-state… 2/2

You might also like