Skip to content

Instantly share code, notes, and snippets.

@schnell18
Created September 10, 2013 07:48
Show Gist options
  • Save schnell18/6506230 to your computer and use it in GitHub Desktop.
Save schnell18/6506230 to your computer and use it in GitHub Desktop.
Display advises on optimal Oracle shared pool size
-- list advises on optimal shared pool size
select 'Shared Pool' component,
shared_pool_size_for_estimate est,
estd_lc_time_saved_factor parse_time_factor,
case when current_parse_time_elapsed_s + adjustment_s < 0
then 0
else current_parse_time_elapsed_s + adjustment_s
end response_time
from (select shared_pool_size_for_estimate,
shared_pool_size_factor,
estd_lc_time_saved_factor,
a.estd_lc_time_saved,
e.value / 100 current_parse_time_elapsed_s,
c.estd_lc_time_saved - a.estd_lc_time_saved adjustment_s
from v$shared_pool_advice a, (select *
from v$sysstat
where name = 'parse time elapsed') e,
(select estd_lc_time_saved
from v$shared_pool_advice
where shared_pool_size_factor = 1)c);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment