statistics_level
How much database and OS statistics Oracle collects.
- Padrão
TYPICAL- Range
- BASIC, TYPICAL, ALL
- Restart needed
- Não
- Default checked on
- Oracle AI Database 26ai / 23ai
O que faz
TYPICAL collects what AWR, ADDM, the advisories and automatic statistics gathering need. ALL adds timed OS statistics and row source execution statistics. BASIC turns most of that off.
Valor padrão
TYPICAL. TYPICAL (Oracle 23ai/26ai).
Check the current value
SHOW PARAMETER statistics_level SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'statistics_level';
Change it
ALTER SESSION SET statistics_level = ALL; -- this session ALTER SYSTEM SET statistics_level = ALL SCOPE=BOTH;
No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. A session can also change its own value with ALTER SESSION. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).
When to change it
Set ALL in a session while tuning a statement (or use the GATHER_PLAN_STATISTICS hint) to see actual row counts per plan step.
What can go wrong
BASIC disables AWR snapshots, memory advisories and automatic SGA tuning; ALL instance-wide adds measurable overhead.
Questions about statistics_level
What is the default value of statistics_level in Oracle?
TYPICAL. TYPICAL (Oracle 23ai/26ai).
Does changing statistics_level require a restart?
No. No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. A session can also change its own value with ALTER SESSION. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).
When should I change statistics_level?
Set ALL in a session while tuning a statement (or use the GATHER_PLAN_STATISTICS hint) to see actual row counts per plan step.
Back to all Oracle settings, or check the Oracle manual for every option.
Check statistics_level on your own server
SQLly runs the query above against Oracle and the other engines in this reference, from one desktop app on macOS, Windows and Linux.