---
title: "sga_max_size应用说明"
author: "sylixj2009"
date: "2010-10-16T21:19:36Z"
tags: []
categories: ["数据库"]
slug: "sga-max-size"
draft: false
lastmod: "2010-10-16T21:19:36Z"
id: 786523
url: "https://springcher.iteye.com/blog/786523"
---

sga_max_size

它是静态参数。

所以不能用

alter system set sga_max_size=4G 
或者
alter system set sga_max_size=4G scope=both
或者
alter system set sga_max_size=4G scope=memory
来修改

但是它可以用

alter system set sga_max_size=4G scope=spfile
来修改，并且必须重起DB才能生效。



********************************************************************************

shared pool size 并不建议设置到1g或者更高，几百兆足以，高了可能出问题。
db cache可以设置高一些，但应该根据你们日常访问的数据量来决定，你如果数据库本身没多少数据的话，也不需要设置太大
sga_max_size可以设置高一些，预留可以调整的内存以便将来动态调整
pga根据你的并发会话和排序数据量决定，一般可以设置大一些
sga+pga<物理内存的90%即可，除非你的机器还准备跑其他应用