Skip to content

Commit 72acf79

Browse files
committed
Shows whether or not to change the setting for DB_CACHE
1 parent b4824fd commit 72acf79

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Diff for: db_cache_advice.sql

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
REM Script Name : db_cache_advice.sql
2+
REM Author : Craig Richards
3+
REM Created : 05-March-2009
4+
REM Last Modified :
5+
REM Version : 1.0
6+
REM
7+
REM Modifications :
8+
REM
9+
REM Description : Shows whether or not to change the setting for DB_CACHE
10+
11+
COLUMN size_for_estimate FORMAT 999,999,999,999 HEADING 'Cache Size(M)'
12+
COLUMN buffers_for_estimate FORMAT 999,999,999 HEADING 'Buffers'
13+
COLUMN estd_physical_read_factor FORMAT 999.90 HEADING 'Estd Phys|Read Factor'
14+
COLUMN estd_physical_reads FORMAT 999,999,999 HEADING 'Estd Phys| Reads'
15+
16+
SET ECHO OFF
17+
SET FEEDBACK OFF
18+
SET PAGESIZE 50
19+
SET LINESIZE 200
20+
21+
SPOOL db_cache_advice.txt
22+
23+
SELECT size_for_estimate, buffers_for_estimate,estd_physical_read_factor,estd_physical_reads
24+
FROM v$db_cache_advice
25+
WHERE name = 'DEFAULT'
26+
AND block_size = (SELECT value FROM v$parameter WHERE name = 'db_block_size')
27+
AND advice_status = 'ON';
28+
29+
SPOOL OFF
30+
31+
SET FEEDBACK 6
32+
SET PAGESIZE 24
33+
34+
CLEAR COLUMNS
35+
36+
REM End of Script

0 commit comments

Comments
 (0)