空表查询很慢oracle,空表,select为什么会很慢啊

DELETE FROM INV.MTL_TRANSACTIONS_INTERFACE;

begin

dbms_stats.gather_table_stats('INV','MTL_TRANSACTIONS_INTERFACE',CASCADE=>TRUE);

end;

TKPROF: Release 10.2.0.1.0 - Production on 星期一 5月 26 13:37:32 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Trace file: ora_659926_prd.trc

Sort options: default

********************************************************************************

count    = number of times OCI procedure was executed

cpu      = cpu time in seconds executing

elapsed  = elapsed time in seconds executing

disk     = number of physical reads of buffers from disk

query    = number of buffers gotten for consistent read

current  = number of buffers gotten in current mode (usually for update)

rows     = number of rows processed by the fetch or execute call

********************************************************************************

alter session set events '10046 trace name context forever, level 12'

call     count       cpu    elapsed       disk      query    current        rows

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

Parse        0      0.00       0.00          0          0          0           0

Execute      1      0.00       0.00          0          0          0           0

Fetch        0      0.00       0.00          0          0          0           0

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

total        1      0.00       0.00          0          0          0           0

Misses in library cache during parse: 0

Misses in library cache during execute: 1

Optimizer mode: CHOOSE

Parsing user id: 177

Elapsed times include waiting on following events:

Event waited on                             Times   Max. Wait  Total Waited

----------------------------------------   Waited  ----------  ------------

SQL*Net message to client                       1        0.00          0.00

SQL*Net message from client                     1       16.63         16.63

********************************************************************************

select *

from inv.mtl_transactions_interface t

call     count       cpu    elapsed       disk      query    current        rows

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

Parse        1      0.06       0.22          0          0          0           0

Execute      1      0.00       0.00          0          0          0           0

Fetch        1      2.93      23.68      82915     136253        863           0

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

total        3      2.99      23.90      82915     136253        863           0

Misses in library cache during parse: 1

Optimizer mode: CHOOSE

Parsing user id: 177

Elapsed times include waiting on following events:

Event waited on                             Times   Max. Wait  Total Waited

----------------------------------------   Waited  ----------  ------------

SQL*Net message to client                       1        0.00          0.00

SQL*Net more data to client                     4        0.00          0.00

file open                                       7        0.01          0.01

db file scattered read                      10374        0.19         21.70

db file sequential read                       154        0.01          0.01

********************************************************************************

OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS

call     count       cpu    elapsed       disk      query    current        rows

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

Parse        1      0.06       0.22          0          0          0           0

Execute      2      0.00       0.00          0          0          0           0

Fetch        1      2.93      23.68      82915     136253        863           0

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

total        4      2.99      23.90      82915     136253        863           0

Misses in library cache during parse: 1

Misses in library cache during execute: 1

Elapsed times include waiting on following events:

Event waited on                             Times   Max. Wait  Total Waited

----------------------------------------   Waited  ----------  ------------

SQL*Net message to client                       2        0.00          0.00

SQL*Net message from client                     1       16.63         16.63

SQL*Net more data to client                     4        0.00          0.00

file open                                       7        0.01          0.01

db file scattered read                      10374        0.19         21.70

db file sequential read                       154        0.01          0.01

OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS

call     count       cpu    elapsed       disk      query    current        rows

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

Parse        0      0.00       0.00          0          0          0           0

Execute      0      0.00       0.00          0          0          0           0

Fetch        0      0.00       0.00          0          0          0           0

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

total        0      0.00       0.00          0          0          0           0

Misses in library cache during parse: 0

2  user  SQL statements in session.

0  internal SQL statements in session.

2  SQL statements in session.

********************************************************************************

Trace file: ora_659926_prd.trc

Trace file compatibility: 8.00.04

Sort options: default

1  session in tracefile.

2  user  SQL statements in trace file.

0  internal SQL statements in trace file.

2  SQL statements in trace file.

2  unique SQL statements in trace file.

10575  lines in trace file.

40  elapsed seconds in trace file.

select 一下居然要半分钟左右,崩溃了, 跟踪文件看了下,时间都花在离散读上了,搞不懂这个是什么原因啊

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值