>  기사  >  데이터 베이스  >  遇到Form性能问题怎么办performanceissue

遇到Form性能问题怎么办performanceissue

WBOY
WBOY원래의
2016-06-07 15:57:101116검색

性能问题是比较复杂的问题. 一般由performance team 负责, 但是常见的情况是, 我们 INV team 定义的 view 不好, 导致查询性能较差. 这个必须由产品组和 performance team 一起来解决了. 遇到性能问题的话, 几个常用的分析方法: 首先要找出性能较差的SQL, 这

性能问题是比较复杂的问题. 一般由performance team 负责, 但是常见的情况是, 我们 INV team 定义的 view 不好, 导致查询性能较差. 这个必须由产品组和 performance team 一起来解决了.

遇到性能问题的话, 几个常用的分析方法:

首先要找出性能较差的SQL, 这个要收集SQL trace, 然后转成 tkprof 文件来看.

把SQL 放到 pl/sql developer 里面, 查看执行计划. 很多时候问题出在没有使用 index, 而是全表扫描了.

按照下面的步骤, 连接sqlplus, 一步一步执行, 生成 SQL trace 和 tkprof 文件. 里面会有更详细的信息.

1. alter session set max_dump_file_size='UNLIMITED';
2. alter session set tracefile_identifier='APPSPERF';
3. alter session set events '10046 trace name context forever, level 12';
4. alter session set statistics_level = 'ALL';
5. declare binds like below

   variable B1 number;
   variable B2 number;
   variable B3 number;
   variable B4 varchar2(50);
   variable B5 number;
   variable B6 number;
   
6. Assign values to binds

   begin
   :B1 := 2666;
   :B2 := 2666;
   :B3 := 2666;
   :B4 := 'VENDOR';
   :B5 := 8617;
   :B6 := 639187;
   end;
   /

7. Execute the test_SQL.sql WITH BIND VARIABLES (with :B1, :B2) 
8. exec dbms_session.reset_package;
9. exit completely from the sqlplus prompt.
10. once the step 9 is done then Pickup the trace file from udump (ls *APPSPERF*) --generated recently
    directory: "SELECT value FROM v$parameter WHERE name ='user_dump_dest'"
11. Generate the tkprof of the trace generated with explain option.
12. provide TRACE,TKPROF and SQLTXTRACT(215187.1) to review it further. 
最后, 发邮件给performance team: appsperf_us@oracle.com.
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.