There are 6 hidden parameters that control ASH behavior, and there are no non-hidden parameters that control ASH behavior.

The following SQL query retrieves these parameters:

SET LINESIZE 150
SET PAGESIZE 100
SET NEWPAGE 0
SET RECSEP OFF
COLUMN parameter_name FORMAT A25
COLUMN parameter_value FORMAT A10
COLUMN description FORMAT A60  -- Increased to avoid wrapping

SELECT
    ksppinm AS parameter_name,
    ksppstvl AS parameter_value,
    ksppdesc AS description
FROM
    X$KSPPI xpi
    JOIN X$KSPPSV xps ON xpi.indx = xps.indx
WHERE
    ksppinm IN ('_ash_sample_all', '_ash_size', '_ash_enable', '_ash_sampling_interval',
                '_ash_disk_write_enable', '_ash_disk_filter_ratio')
ORDER BY
    ksppinm;

Sample output (default values):

PARAMETER_NAME            PARAMETER_ DESCRIPTION                                                   
------------------------- ---------- ------------------------------------------------------------ 
_ash_disk_filter_ratio    10         Ratio of the number of in-memory samples to the number of samples actually written to disk 
_ash_disk_write_enable    TRUE       To enable or disable Active Session History flushing          
_ash_enable               TRUE       To enable or disable Active Session sampling and flushing     
_ash_sample_all           FALSE      To enable or disable sampling every connected session including ones waiting for idle waits 
_ash_sampling_interval    1000       Time interval between two successive Active Session samples in millisecs 
_ash_size                 1048618    To set the size of the in-memory Active Session History buffers 

6 rows selected.

The description column provides sufficient explanation for each parameter. These defaults are appropriate for nearly all environments and typically do not require modification.

Caution: You usually do not need to change these parameters. If you have to, proceed with caution and ensure you understand the implications of each change.

Leave a comment

I’m Yuan

Welcome to the blog of a performance maven in Oracle & MySQL. Feel free to contact me to share and discuss database knowledge.

My 20 Oracle Certifications

A screenshot from certview.oracle.com

My Book

MySQL 8.0 Operations and Optimization

Let’s connect