查询 v$lock 很慢,hint来帮忙-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 3502679
  • 博文数量: 718
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7790
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(718)

文章存档

2024年(4)

2023年(74)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客
相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: oracle

2021-05-18 13:56:01


看一眼数据库负载 11.2.0.4 rac,居然是监控系统占用资源最多,首当其冲的就是以下语句

select count(*) from v$lock where type = 'tx' and request = 6;
很简单,检查当前有几个请求独占的锁


查询时间很长,其中出现了之前提到过的“合并连接卡迪森”

看看访问路径,过滤条件
  1. sql_id b1na79hpa7k3p, child number 0
  2. -------------------------------------
  3. select count(*) from v$lock where type = 'tx' and request = 6;

  4. plan hash value: 2384831130

  5. ---------------------------------------------------------------------------
  6. | id | operation | name | rows | bytes | cost (%cpu)|
  7. ---------------------------------------------------------------------------
  8. | 0 | select statement | | | | 1 (100)|
  9. | 1 | sort aggregate | | 1 | 53 | |
  10. |* 2 | hash join | | 1 | 53 | 0 (0)|
  11. | 3 | merge join cartesian | | 1 | 41 | 0 (0)|
  12. |* 4 | fixed table full | x$ksuse | 1 | 19 | 0 (0)|
  13. | 5 | buffer sort | | 1 | 22 | 0 (0)|
  14. |* 6 | fixed table full | x$ksqrs | 1 | 22 | 0 (0)|
  15. | 7 | view | gv$_lock | 10 | 120 | 0 (0)|
  16. | 8 | union-all | | | | |
  17. |* 9 | filter | | | | |
  18. | 10 | view | gv$_lock1 | 2 | 24 | 0 (0)|
  19. | 11 | union-all | | | | |
  20. |* 12 | fixed table full| x$kdnssf | 1 | 64 | 0 (0)|
  21. |* 13 | fixed table full| x$ksqeq | 1 | 64 | 0 (0)|
  22. |* 14 | fixed table full | x$ktadm | 1 | 64 | 0 (0)|
  23. |* 15 | fixed table full | x$ktatrfil | 1 | 64 | 0 (0)|
  24. |* 16 | fixed table full | x$ktatrfsl | 1 | 64 | 0 (0)|
  25. |* 17 | fixed table full | x$ktatl | 1 | 64 | 0 (0)|
  26. |* 18 | fixed table full | x$ktstusc | 1 | 64 | 0 (0)|
  27. |* 19 | fixed table full | x$ktstuss | 1 | 64 | 0 (0)|
  28. |* 20 | fixed table full | x$ktstusg | 1 | 64 | 0 (0)|
  29. |* 21 | fixed table full | x$ktcxb | 1 | 64 | 0 (0)|
  30. ---------------------------------------------------------------------------

  31. query block name / object alias (identified by operation id):
  32. -------------------------------------------------------------

  33.    1 - sel$af73c875
  34.    4 - sel$af73c875 / s@sel$4
  35.    6 - sel$af73c875 / r@sel$4
  36.    7 - set$1 / gv$_lock@sel$5
  37.    8 - set$1
  38.    9 - sel$68b588a0
  39.   10 - set$2 / gv$_lock1@sel$7
  40.   11 - set$2
  41.   12 - sel$8 / x$kdnssf@sel$8
  42.   13 - sel$9 / x$ksqeq@sel$9
  43.   14 - sel$10 / x$ktadm@sel$10
  44.   15 - sel$11 / x$ktatrfil@sel$11
  45.   16 - sel$12 / x$ktatrfsl@sel$12
  46.   17 - sel$13 / x$ktatl@sel$13
  47.   18 - sel$14 / x$ktstusc@sel$14
  48.   19 - sel$15 / x$ktstuss@sel$15
  49.   20 - sel$16 / x$ktstusg@sel$16
  50.   21 - sel$17 / x$ktcxb@sel$17

  51. outline data
  52. -------------

  53.   /*
  54.       begin_outline_data
  55.       ignore_optim_embedded_hints
  56.       optimizer_features_enable('11.2.0.4')
  57.       db_version('11.2.0.4')
  58.       opt_param('_optim_peek_user_binds' 'false')
  59.       opt_param('_optimizer_extended_cursor_sharing' 'none')
  60.       opt_param('_gby_hash_aggregation_enabled' 'false')
  61.       opt_param('_optimizer_extended_cursor_sharing_rel' 'none')
  62.       opt_param('_optimizer_adaptive_cursor_sharing' 'false')
  63.       opt_param('_optimizer_use_feedback' 'false')
  64.       all_rows
  65.       outline_leaf(@"sel$8")
  66.       outline_leaf(@"sel$9")
  67.       outline_leaf(@"set$2")
  68.       outline_leaf(@"sel$68b588a0")
  69.       merge(@"sel$7")
  70.       outline_leaf(@"sel$10")
  71.       outline_leaf(@"sel$11")
  72.       outline_leaf(@"sel$12")
  73.       outline_leaf(@"sel$13")
  74.       outline_leaf(@"sel$14")
  75.       outline_leaf(@"sel$15")
  76.       outline_leaf(@"sel$16")
  77.       outline_leaf(@"sel$17")
  78.       outline_leaf(@"set$1")
  79.       outline_leaf(@"sel$af73c875")
  80.       merge(@"sel$71d7a081")
  81.       outline(@"sel$6")
  82.       outline(@"sel$7")
  83.       outline(@"sel$1")
  84.       outline(@"sel$71d7a081")
  85.       merge(@"sel$c8360722")
  86.       outline(@"sel$2")
  87.       outline(@"sel$c8360722")
  88.       merge(@"sel$7286615e")
  89.       outline(@"sel$3")
  90.       outline(@"sel$7286615e")
  91.       merge(@"sel$5")
  92.       outline(@"sel$4")
  93.       outline(@"sel$5")
  94.       full(@"sel$af73c875" "s"@"sel$4")
  95.       full(@"sel$af73c875" "r"@"sel$4")
  96.       no_access(@"sel$af73c875" "gv$_lock"@"sel$5")
  97.       leading(@"sel$af73c875" "s"@"sel$4" "r"@"sel$4" "gv$_lock"@"sel$5")
  98.       use_merge_cartesian(@"sel$af73c875" "r"@"sel$4")
  99.       use_hash(@"sel$af73c875" "gv$_lock"@"sel$5")
  100.       full(@"sel$17" "x$ktcxb"@"sel$17")
  101.       full(@"sel$16" "x$ktstusg"@"sel$16")
  102.       full(@"sel$15" "x$ktstuss"@"sel$15")
  103.       full(@"sel$14" "x$ktstusc"@"sel$14")
  104.       full(@"sel$13" "x$ktatl"@"sel$13")
  105.       full(@"sel$12" "x$ktatrfsl"@"sel$12")
  106.       full(@"sel$11" "x$ktatrfil"@"sel$11")
  107.       full(@"sel$10" "x$ktadm"@"sel$10")
  108.       no_access(@"sel$68b588a0" "gv$_lock1"@"sel$7")
  109.       full(@"sel$9" "x$ksqeq"@"sel$9")
  110.       full(@"sel$8" "x$kdnssf"@"sel$8")
  111.       end_outline_data
  112.   */

  113. predicate information (identified by operation id):
  114. ---------------------------------------------------

  115.    2 - access("saddr"="s"."addr" and
  116.               to_char(userenv('instance'))||rawtohex("raddr")=to_char("r"."inst_id")||
  117.               rawtohex("r"."addr"))
  118.    4 - filter("s"."inst_id"=userenv('instance'))
  119.    6 - filter("r"."ksqrsidt"='tx')
  120.    9 - filter(userenv('instance') is not null)
  121.   12 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  122.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  123.   13 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  124.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  125.   14 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  126.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  127.   15 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  128.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  129.   16 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  130.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  131.   17 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  132.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  133.   18 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  134.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  135.   19 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  136.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  137.   20 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  138.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0))
  139.   21 - filter(("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  140.               "inst_id"=userenv('instance') and bitand("ksspaflg",1)<>0))

  141. column projection information (identified by operation id):
  142. -----------------------------------------------------------

  143.    1 - (#keys=0) count(*)[22]
  144.    2 - (#keys=2)
  145.    3 - "s"."addr"[raw,8], "r"."addr"[raw,8], "r"."inst_id"[number,22]
  146.    4 - "s"."addr"[raw,8], "s"."inst_id"[number,22]
  147.    5 - (#keys=0) "r"."addr"[raw,8], "r"."inst_id"[number,22]
  148.    6 - "r"."addr"[raw,8], "r"."inst_id"[number,22],
  149.        "r"."ksqrsidt"[varchar2,2]
  150.    7 - "saddr"[raw,8], "raddr"[raw,8]
  151.    8 - strdef[8], strdef[8]
  152.    9 - "saddr"[raw,8], "raddr"[raw,8]
  153.   10 - "saddr"[raw,8], "raddr"[raw,8]
  154.   11 - strdef[8], strdef[8]
  155.   12 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  156.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  157.   13 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  158.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  159.   14 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  160.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  161.   15 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  162.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  163.   16 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  164.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  165.   17 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  166.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  167.   18 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  168.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  169.   19 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  170.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  171.   20 - "inst_id"[number,22], "kssobflg"[number,22], "ksqlkres"[raw,8],
  172.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]
  173.   21 - "inst_id"[number,22], "ksspaflg"[number,22], "ksqlkres"[raw,8],
  174.        "ksqlkmod"[number,22], "ksqlkreq"[number,22], "ksqlkses"[raw,8]

破解的办法就是加提示:ordered

说明:
如果从执行联接的sql语句中没有ordered提示,那么优化器将选择联接表的顺序。如果您对优化器不知道的每个表中所选行的数量有所了解,则可能需要使用ordered提示来指定联接顺序。这样的信息可以让您比优化器更好地选择内部和外部表。

当sql将大量表连接在一起(> 5)并且您知道应该始终按特定顺序连接表时,有序提示可能会极大地提高性能。

  1. 11:30:38 sys@orcl1> set autot trace exp stat
  2. 11:30:46 sys@orcl1> select /* rule */ count(*) from v$lock where type = 'tx' and request = 6;
  3.  elapsed: 00:00:00.24

  4. execution plan
  5. ----------------------------------------------------------
  6. plan hash value: 2026431807

  7. -------------------------------------------------
  8. | id | operation | name |
  9. -------------------------------------------------
  10. | 0 | select statement | |
  11. | 1 | sort aggregate | |
  12. | 2 | merge join | |
  13. | 3 | sort join | |
  14. | 4 | merge join | |
  15. | 5 | sort join | |
  16. |* 6 | fixed table full | x$ksqrs |
  17. |* 7 | sort join | |
  18. | 8 | view | gv$_lock |
  19. | 9 | union-all | |
  20. |* 10 | filter | |
  21. | 11 | view | gv$_lock1 |
  22. | 12 | union-all | |
  23. |* 13 | fixed table full| x$kdnssf |
  24. |* 14 | fixed table full| x$ksqeq |
  25. |* 15 | fixed table full | x$ktadm |
  26. |* 16 | fixed table full | x$ktatrfil |
  27. |* 17 | fixed table full | x$ktatrfsl |
  28. |* 18 | fixed table full | x$ktatl |
  29. |* 19 | fixed table full | x$ktstusc |
  30. |* 20 | fixed table full | x$ktstuss |
  31. |* 21 | fixed table full | x$ktstusg |
  32. |* 22 | fixed table full | x$ktcxb |
  33. |* 23 | sort join | |
  34. |* 24 | fixed table full | x$ksuse |
  35. -------------------------------------------------

  36. predicate information (identified by operation id):
  37. ---------------------------------------------------

  38.    6 - filter("r"."ksqrsidt"='tx')
  39.    7 - access(to_char(userenv('instance'))||rawtohex("raddr")=to_char("r
  40.               "."inst_id")||rawtohex("r"."addr"))
  41.        filter(to_char(userenv('instance'))||rawtohex("raddr")=to_char("r
  42.               "."inst_id")||rawtohex("r"."addr"))
  43.   10 - filter(userenv('instance')=userenv('instance'))
  44.   13 - filter("ksqlkreq"=6 and "inst_id"=userenv('instance') and
  45.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  46.   14 - filter("ksqlkreq"=6 and "inst_id"=userenv('instance') and
  47.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  48.   15 - filter("inst_id"=userenv('instance') and "ksqlkreq"=6 and
  49.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  50.   16 - filter("inst_id"=userenv('instance') and "ksqlkreq"=6 and
  51.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  52.   17 - filter("inst_id"=userenv('instance') and "ksqlkreq"=6 and
  53.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  54.   18 - filter("inst_id"=userenv('instance') and "ksqlkreq"=6 and
  55.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  56.   19 - filter("inst_id"=userenv('instance') and "ksqlkreq"=6 and
  57.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  58.   20 - filter("inst_id"=userenv('instance') and "ksqlkreq"=6 and
  59.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  60.   21 - filter("inst_id"=userenv('instance') and "ksqlkreq"=6 and
  61.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("kssobflg",1)<>0)
  62.   22 - filter("inst_id"=userenv('instance') and "ksqlkreq"=6 and
  63.               ("ksqlkmod"<>0 or "ksqlkreq"<>0) and bitand("ksspaflg",1)<>0)
  64.   23 - access("saddr"="s"."addr")
  65.        filter("saddr"="s"."addr")
  66.   24 - filter("s"."inst_id"=userenv('instance'))

  67. note
  68. -----
  69.    - rule based optimizer used (consider using cbo)


  70. statistics
  71. ----------------------------------------------------------
  72.           0 recursive calls
  73.           1 db block gets
  74.           0 consistent gets
  75.           0 physical reads
  76.           0 redo size
  77.         596 bytes sent via sql*net to client
  78.         520 bytes received via sql*net from client
  79.           2 sql*net roundtrips to/from client
  80.           3 sorts (memory)
  81.           0 sorts (disk)
  82.           1 rows processed

  83. 11:30:48 sys@orcl1>
  84. 11:31:24 sys@orcl1>
  85. 11:31:25 sys@orcl1> select /* ordered */count(*) from v$lock where type = 'tx' and request = 6;
  86. elapsed: 00:00:00.21

  87. execution plan
  88. ----------------------------------------------------------
  89. plan hash value: 3730480328

  90. ---------------------------------------------------------------------------------------
  91. | id | operation | name | rows | bytes | cost (%cpu)| time |
  92. ---------------------------------------------------------------------------------------
  93. | 0 | select statement | | 1 | 53 | 1 (100)| 00:00:01 |
  94. | 1 | sort aggregate | | 1 | 53 | | |
  95. |* 2 | hash join | | 1 | 53 | 1 (100)| 00:00:01 |
  96. |* 3 | hash join | | 1 | 31 | 0 (0)| 00:00:01 |
  97. | 4 | view | gv$_lock | 10 | 120 | 0 (0)| 00:00:01 |
  98. | 5 | union-all | | | | | |
  99. |* 6 | filter | | | | | |
  100. | 7 | view | gv$_lock1 | 2 | 24 | 0 (0)| 00:00:01 |
  101. | 8 | union-all | | | | | |
  102. |* 9 | fixed table full| x$kdnssf | 1 | 64 | 0 (0)| 00:00:01 |
  103. |* 10 | fixed table full| x$ksqeq | 1 | 64 | 0 (0)| 00:00:01 |
  104. |* 11 | fixed table full | x$ktadm | 1 | 64 | 0 (0)| 00:00:01 |
  105. |* 12 | fixed table full | x$ktatrfil | 1 | 64 | 0 (0)| 00:00:01 |
  106. |* 13 | fixed table full | x$ktatrfsl | 1 | 64 | 0 (0)| 00:00:01 |
  107. |* 14 | fixed table full | x$ktatl | 1 | 64 | 0 (0)| 00:00:01 |
  108. |* 15 | fixed table full | x$ktstusc | 1 | 64 | 0 (0)| 00:00:01 |
  109. |* 16 | fixed table full | x$ktstuss | 1 | 64 | 0 (0)| 00:00:01 |
  110. |* 17 | fixed table full | x$ktstusg | 1 | 64 | 0 (0)| 00:00:01 |
  111. |* 18 | fixed table full | x$ktcxb | 1 | 64 | 0 (0)| 00:00:01 |
  112. |* 19 | fixed table full | x$ksuse | 1 | 19 | 0 (0)| 00:00:01 |
  113. |* 20 | fixed table full | x$ksqrs | 1 | 22 | 0 (0)| 00:00:01 |
  114. ---------------------------------------------------------------------------------------

  115. predicate information (identified by operation id):
  116. ---------------------------------------------------

  117.    2 - access(to_char(userenv('instance'))||rawtohex("raddr")=to_char("r"."inst
  118.               _id")||rawtohex("r"."addr"))
  119.    3 - access("saddr"="s"."addr")
  120.    6 - filter(userenv('instance') is not null)
  121.    9 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  122.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  123.   10 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  124.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  125.   11 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  126.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  127.   12 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  128.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  129.   13 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  130.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  131.   14 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  132.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  133.   15 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  134.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  135.   16 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  136.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  137.   17 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  138.               "inst_id"=userenv('instance') and bitand("kssobflg",1)<>0)
  139.   18 - filter("ksqlkreq"=6 and ("ksqlkmod"<>0 or "ksqlkreq"<>0) and
  140.               "inst_id"=userenv('instance') and bitand("ksspaflg",1)<>0)
  141.   19 - filter("s"."inst_id"=userenv('instance'))
  142.   20 - filter("r"."ksqrsidt"='tx')


  143. statistics
  144. ----------------------------------------------------------
  145.           1 recursive calls
  146.           1 db block gets
  147.           0 consistent gets
  148.           0 physical reads
  149.           0 redo size
  150.         596 bytes sent via sql*net to client
  151.         520 bytes received via sql*net from client
  152.           2 sql*net roundtrips to/from client
  153.           0 sorts (memory)
  154.           0 sorts (disk)
  155.           1 rows processed
从300多秒降低到 0.1秒

但是监控系统是成熟”商业软件,不能改写语句,怎么办呢?
设置触发器?还是设置某个神奇的隐含参数?


以下方法有的情况下有效:
  1. begin
  2.  dbms_stats.gather_table_stats('sys','x$ksuse',method_opt=>'for all columns size 1');
  3.  dbms_stats.gather_table_stats('sys','x$ksqrs',method_opt=>'for all columns size 1');
  4. end;
  5. /
对于视图内的合并连接卡迪森,之前的方法
alter session set "_optimizer_mjc_enabled"=flase;不起作用

阅读(1350) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图