How To Tune or Test PLSQL Code Performance in Oracle D2k Forms
2016-12-25 18:16
525 查看
You can test or tune your program unit performance in Oracle forms with Ora_Prof package.
Suppose you have created to procedure to perform a single task with different logic and you want to check exactly which procedure is performing well. See the below example:
declare
i PLS_INTEGER;
BEGIN
--test 1
Ora_Prof.Create_Timer('test1');
Ora_Prof.Start_Timer('test1');
yourprogramunitwithsomelogic;
Ora_Prof.Stop_Timer('test1');
message('Test 1 Time taken '||Ora_Prof.Elapsed_Time('test1'), acknowledge);
Ora_Prof.Destroy_Timer('test1');
-- test 2
Ora_Prof.Create_Timer('test2');
Ora_Prof.Start_Timer('test2');
yourprogramunitwithanotherlogic;
Ora_Prof.Stop_Timer('test2');
message('Test 2 Time taken '||Ora_Prof.Elapsed_Time('test2'),acknowledge);
message('Test 2 Time taken '||Ora_Prof.Elapsed_Time('test2'),acknowledge);
Ora_Prof.Destroy_Timer('test2');
END;
It will give the result in milliseconds and now you can analyze that which program is working good.
See also:
Suppose you have created to procedure to perform a single task with different logic and you want to check exactly which procedure is performing well. See the below example:
declare
i PLS_INTEGER;
BEGIN
--test 1
Ora_Prof.Create_Timer('test1');
Ora_Prof.Start_Timer('test1');
yourprogramunitwithsomelogic;
Ora_Prof.Stop_Timer('test1');
message('Test 1 Time taken '||Ora_Prof.Elapsed_Time('test1'), acknowledge);
Ora_Prof.Destroy_Timer('test1');
-- test 2
Ora_Prof.Create_Timer('test2');
Ora_Prof.Start_Timer('test2');
yourprogramunitwithanotherlogic;
Ora_Prof.Stop_Timer('test2');
message('Test 2 Time taken '||Ora_Prof.Elapsed_Time('test2'),acknowledge);
message('Test 2 Time taken '||Ora_Prof.Elapsed_Time('test2'),acknowledge);
Ora_Prof.Destroy_Timer('test2');
END;
It will give the result in milliseconds and now you can analyze that which program is working good.
See also:
Creating, Stoping, Re-Starting timer in Oracle Forms
Tune Oracle Form's PLSQL Code with the help of timer
相关文章推荐
- How to test the code which maybe distroyed in the future ?
- How To Troubleshoot Oracle Redo Log Reading Extract Slow Performance Issue using TESTMAPPINGSPEED (文
- How to write the fast code/ high performance in C#
- How to Delete From or Add Resource to OCR in Oracle Clusterware (文档 ID 1069369.1)
- How to search All-In-OneCode Framework with google or Bing
- How to Backup Project in TestDirector 7.6 and 8.0
- What 's CATT(Computer Aided Test Tool)?How to deal with the CATT in the SAP System?什么是CATT(计算机附加测试工具)
- how to check in code to ooo-build
- How to read Mac .DMG file in Linux or PC(II)
- How to create an Excel sheet or chart in VC?
- ORACLE中IN和OR谁更高效?【WHICH KEY WORD CAN GET BETTER PERFORMANCE? 】 推荐
- how to enable or disable registry editing in xp
- How to create an Excel sheet or chart in VC?
- According to TLD or attribute directive in tag file, attribute test does not accept any expressions
- How to troubleshoot the performance of Ad-Hoc queries in SQL Server [ZT-from MS]
- How To Enable or Disable Simple File Sharing in Windows XP
- How to Update millions or records in a table", version 8.1.7
- How to generate a log file in VC++ or Embedded VC++ (For Pocket PC or WinCE devices)
- How to Write High-Performance C# Code
- How To Use WordBasic Functions in an MFC Automation Client for Word 97, Word 2000, Word 2002, or Word 2003