ArcGIS Desktop 10.0 or better.
.Net Runtime 3.5 or better.
Executing: stop_oratrace TEST.DLTB
Start Time: Tue Nov 08 09:19:08 2011
Trace file location is recorded in a table called 'draw_tyme_trace_file_name' in this users schema
Succeeded at Tue Nov 08 09:19:11 2011 (Elapsed Time: 3.00 seconds)
我们可以当前连接用户查看draw_tyme_trace_file_name的表,相关的Trace文件路径就存储在那里。
C:\Users\gis>tkprof Usage: tkprof tracefile outputfile [explain= ] [table= ] [print= ] [insert= ] [sys= ] [sort= ] table=schema.tablename Use 'schema.tablename' with 'explain=' option. explain=user/password Connect to ORACLE and issue EXPLAIN PLAN. print=integer List only the first 'integer' SQL statements. aggregate=yes|no insert=filename List SQL statements and data inside INSERT statements. sys=no TKPROF does not list SQL statements run as user SYS. record=filename Record non-recursive statements found in the trace file. waits=yes|no Record summary for any wait events found in the trace file. sort=option Set of zero or more of the following sort options: prscnt number of times parse was called prscpu cpu time parsing prsela elapsed time parsing prsdsk number of disk reads during parse prsqry number of buffers for consistent read during parse prscu number of buffers for current read during parse prsmis number of misses in library cache during parse execnt number of execute was called execpu cpu time spent executing exeela elapsed time executing exedsk number of disk reads during execute exeqry number of buffers for consistent read during execute execu number of buffers for current read during execute exerow number of rows processed during execute exemis number of library cache misses during execute fchcnt number of times fetch was called fchcpu cpu time spent fetching fchela elapsed time fetching fchdsk number of disk reads during fetch fchqry number of buffers for consistent read during fetch fchcu number of buffers for current read during fetch fchrow number of rows fetched userid userid of user that parsed the cursor C:\Users\gis>tkprof c:\1.trc output = c:\222.trc TKPROF: Release 11.2.0.1.0 - Development on 星期二 11月 8 09:26:33 2011 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.我没有添加其他Option选项,大家可以自己测试,我们打开解析转换好的新文件
TKPROF: Release 11.2.0.1.0 - Development on 星期一 11月 7 11:37:34 2011 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Trace file: c:\1.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 ******************************************************************************** SQL ID: 3nkd3g3ju5ph1 Plan Hash: 2853959010 select obj#,type#,ctime,mtime,stime, status, dataobj#, flags, oid$, spare1, spare2 from obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null and linkname is null and subname is null call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 7 0.00 0.00 0 0 0 0 Execute 129 0.03 0.04 0 0 0 0 Fetch 129 0.00 0.17 37 510 0 123 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 265 0.03 0.22 37 510 0 123 Misses in library cache during parse: 1 Misses in library cache during execute: 1 Optimizer mode: CHOOSE Parsing user id: SYS (recursive depth: 1) Rows Row Source Operation ------- --------------------------------------------------- 0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=3 pr=1 pw=0 time=0 us cost=4 size=83 card=1) 0 INDEX RANGE SCAN I_OBJ2 (cr=3 pr=1 pw=0 time=0 us cost=3 size=0 card=1)(object id 37) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ db file sequential read 37 0.05 0.15 ******************************************************************************** SQL ID: 82b9x84vs49nr Plan Hash: 1388734953 Select 'SQL TRACE STARTED FROM GEOPROCESSING' as NOTE from DUAL call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 3 0.00 0.07 1 3 0 0 Execute 3 0.00 0.00 0 0 0 0 Fetch 3 0.00 0.00 0 0 0 3 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 9 0.00 0.07 1 3 0 3 Misses in library cache during parse: 3 Optimizer mode: ALL_ROWS Parsing user id: 93 Rows Row Source Operation ------- --------------------------------------------------- 1 FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ SQL*Net message to client 6 0.00 0.00 SQL*Net message from client 6 8.69 14.20 ********************************************************************************
Executing: start_sqltrace sde.SDE.dltb c:\11.trc
Start Time: Mon Nov 07 11:56:45 2011
Underlying DBMS error [Microsoft SQL Server Native Client 10.0: 您没有运行
'SP_TRACE_CREATE' 的权限。]
Failed to execute (start_sqltrace).
Failed at Mon Nov 07 11:56:45 2011 (Elapsed Time: 0.00 seconds)
Draw Tyme This tool generates a .csv file that contains layer draw time information. It draws extents that are determined by the features of a “driving” featureclass. This tool can be useful for finding layers that contribute to slow drawing at different scales. The .csv can be conveniently analyzed in Excel or similar spreadsheet programs.
B-boxer B-boxer can be used to generate a “driving” featureclass for “Draw Tyme”. It requires an input point featureclass. That featureclass can be created with the “Create Random Points” tool. Together these tools allow you to generate random extents within an area of interest at scales of interest. B-boxer also outputs the extent information to a .csv file. The .csv file can be adapted for use in tools like Jmeter and StresStimulus (Internet application load testing tools).
Export Group Layers “Draw Tyme” will only generate layer draw time information for layers at the root level of the table of contents. Therefore, group layers are not very compatible with “Draw Tyme”. You can “flatten-out” the group layers from a given document to a directory of .lyr files with this tool. Essentially, it takes the visibility and scale dependency from the top-most (root) containing group layers and applies them to the bottom-most (leaf) layers, exporting them to .lyr files. You can then make a new mxd from these .lyrs. This mxd will have the same drawing behaviors as the source and you will get the draw timing output information that you desire from “Draw Tyme”. Note that not all group layers can be decomposed into individual .lyr parts. Basemap layers and ArcGIS Server service layers are examples of types that will not be “exploded” in this way because ArcGIS does not allow it.