Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> TKPROF - Database tunning question
Hi there
Please see if you can help me out. This is about database tunning.
We have a PowerBuilder Application runs on an NT box (2 CPUs Pentium. 300) and a HP-UNIX Box (2 CPUs, 2GB of physical memory, no idea about the rest). I exported the schema from theUNIX box and loaded into the NT box to make sure the application hits the same database (schema).
When we ran the same operation on the application. The time it took on the NT box is 50% faster than the UNIX box.
I traced both servers, tkprof them and what I noticed is that the CPU and Elapsed time for Fetch are almost double on the UNIX box.
Most of the problem happens on SELECT. Below are part of the trace file. It is a SELECT statement. The execution plan is the same. All so there are another 4 Oracle instances runs on the UNIX box. By looking at the trace I have a feeling that the UNIX is CPU-bound.
Am I right?
If I stop all others Oracle instances will it help?
Since the cpu and elapsed columns a in hundredth second. Which one give
me the total time
sum(total cpu + total elapsed) OR sum (total elapsed)
Thanks in advance for your help.
Tung Nguyen
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 22 (SYLVAN)
Rows Execution Plan
------- ---------------------------------------------------
0 SELECT STATEMENT GOAL: CHOOSE
218 FILTER
45487 TABLE ACCESS GOAL: ANALYZED (FULL) OF 'SECURITY'
218 INDEX GOAL: ANALYZED (UNIQUE SCAN) OF 'PK_NON_CASH_SEC'
(UNIQUE)
201 SORT (AGGREGATE)
201 FIRST ROW 201 INDEX GOAL: ANALYZED (RANGE SCAN) OF 'SECURITY_ID_IDX' (UNIQUE) ****************************************************************************
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 149 (JANUS_400)
Rows Execution Plan
------- ---------------------------------------------------
0 SELECT STATEMENT GOAL: CHOOSE
218 FILTER
45487 TABLE ACCESS GOAL: ANALYZED (FULL) OF 'SECURITY'
218 INDEX (UNIQUE SCAN) OF 'PK_NON_CASH_SEC' (UNIQUE)
201 SORT (AGGREGATE)
201 FIRST ROW 201 INDEX GOAL: ANALYZED (RANGE SCAN) OF 'SECURITY_ID_IDX' (UNIQUE) ****************************************************************************
...... ..... ..... ..... ......
And these are the overall of the two sessions
FROM UNIX Box ----------------------------------------------------------- ****************************************************************************
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 7025
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 3
7051 user SQL statements in session.
6915 internal SQL statements in session.
13966 SQL statements in session.
7029 statements EXPLAINed in this session.
1 session in tracefile.
7051 user SQL statements in trace file.
6915 internal SQL statements in trace file.
13966 SQL statements in trace file.
7040 unique SQL statements in trace file.
7029 SQL statements EXPLAINed using schema:
sylvan.plan_table Schema was specified. Existing table was used.
FROM NT Box ------------------------------------------------------------- ****************************************************************************
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 3367
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 39
3398 user SQL statements in session.
3454 internal SQL statements in session.
6852 SQL statements in session.
3383 statements EXPLAINed in this session.
1 session in tracefile.
3398 user SQL statements in trace file.
3454 internal SQL statements in trace file.
6852 SQL statements in trace file.
3412 unique SQL statements in trace file.
3383 SQL statements EXPLAINed using schema:
janus_400.plan_table Schema was specified. Existing table was used.
![]() |
![]() |