Oracle 9i越来越慢

[复制链接]
查看11 | 回复9 | 2012-1-4 11:51:22 | 显示全部楼层 |阅读模式
Linux AS4 系统;
4CPU,4G内存;
Oracle 9.2.0.4
共享内存 300M
缓存 1200M
large pool 16M
Java pool 32M
PGA 200M
现在数据库比较慢,查询需要5s钟。所有大表有索引,为什么?
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
TOP
VMSTAT 10 10
查看一下你系统的性能,检查那些进程占用资源多
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
先去查v$session_wait,看慢的查询究竟在等待什么。
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
做一个statspack report传上来.
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
是不是表的碎片太多了,索引没有被正常使用?
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
做一个statspack上传,什么都没有怎么判断,看看置顶的rollingpig的帖子
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
statspack report 怎么用啊?
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
看等待时间,sql的执行计划。
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
LZ,5S在你客户忍受范围之内吗?我们这里优化的第一原则,客户可以忍受就不需要优化,HOHO
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
STATSPACK report for
DB Name DB IdInstance Inst Num Release Cluster Host
------------ ----------- ------------ -------- ----------- ------- ------------
GSMSFC1484011727 GSMSFC
1 9.2.0.4.0 NOlocalhost

Snap Id Snap TimeSessions Curs/Sess Comment

------- ------------------ -------- --------- -------------------
Begin Snap: 1 06-Apr-07 13:45:43 2913.6
End Snap: 2 06-Apr-07 13:46:07 2913.9
Elapsed:
0.40 (mins)
Cache Sizes (end)
~~~~~~~~~~~~~~~~~

Buffer Cache: 1,200MStd Block Size: 8K
Shared Pool Size: 304M
Log Buffer: 2,048K
Load Profile
~~~~~~~~~~~~
Per Second Per Transaction

--------------- ---------------

Redo size:
59,151.50
37,358.84

Logical reads:
9,754.17
6,160.53

Block changes:
105.33
66.53

Physical reads:
203.08
128.26

Physical writes:
203.46
128.50

User calls:
2.79
1.76

Parses:
4.08
2.58

Hard parses:
0.83
0.53

Sorts:
3.63
2.29

Logons:
0.00
0.00

Executes:
18.88
11.92

Transactions:
1.58
% Blocks changed per Read:1.08Recursive Call %:93.14
Rollback per transaction %:0.00 Rows per Sort:1077.08
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Buffer Nowait %:100.00 Redo NoWait %:100.00

BufferHit %:100.00In-memory Sort %: 97.70

Library Hit %: 92.09Soft Parse %: 79.59
Execute to Parse %: 78.37 Latch Hit %:100.00
Parse CPU to Parse Elapsd %:
% Non-Parse CPU:
Shared Pool StatisticsBegin End

------------

Memory Usage %: 92.59 92.59
% SQL with executions>1: 15.14 15.28
% Memory for SQL w/exec>1: 16.03 16.38
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~
% Total
Event
WaitsTime (s) Ela Time
-------------------------------------------- ------------ ----------- --------
log file sync
17 091.55
control file parallel write
8 0 6.56
control file sequential read
58 0.81
direct path read
93 0.52
log file parallel write
39 0.49

-------------------------------------------------------------
Wait Events for DB: GSMSFCInstance: GSMSFCSnaps: 1 -2
-> s- second
-> cs - centisecond - 100th of a second
-> ms - millisecond -1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)

Avg

Total Wait waitWaits
Event
Waits Timeouts Time (s) (ms) /txn
---------------------------- ------------ ---------- ---------- ------ --------
log file sync
17
0
040.4
control file parallel write
8
0
010.2
control file sequential read 58
0
001.5
direct path read
93
0
002.4
log file parallel write
39 39
001.0
direct path write
8
0
000.2
db file parallel write
4
0
000.1
SQL*Net message from client
34
0131 38500.9
wakeup time manager
1
1 30300010.0
SQL*Net message to client
34
0
000.9

-------------------------------------------------------------
Background Wait Events for DB: GSMSFCInstance: GSMSFCSnaps: 1 -2
-> ordered by wait time desc, waits desc (idle events last)

Avg

Total Wait waitWaits
Event
Waits Timeouts Time (s) (ms) /txn
---------------------------- ------------ ---------- ---------- ------ --------
control file parallel write
8
0
010.2
log file parallel write
39 39
001.0
control file sequential read
4
0
000.1
db file parallel write
4
0
000.1
rdbms ipc message
132 93 675093.5
pmon timer
8
8 23 29300.2

-------------------------------------------------------------
SQL ordered by Gets for DB: GSMSFCInstance: GSMSFCSnaps: 1 -2
-> End Buffer Gets Threshold: 10000
-> Note that resources reported for PL/SQL includes the resources used by
all SQL statements called within the PL/SQL code.As individual SQL
statements are also reported, it is possible and valid for the summed
total % to exceed 100
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行