Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

statspack report shows low execute to parse%

187 views
Skip to first unread message

clement rajappa

unread,
Sep 2, 2005, 1:44:36 PM9/2/05
to
Hi
I am working on oracle 8i under win2k dell server. Recently i ran
Statspack to observe the performance and found the following under
the heading
Instance Efficiency Percentage (Target 100%):
---------------------------------------------
Execute to Parse % : 35.84
Parse CPU to Parse Elapsed % : 1.48

These 2 are way below the 100% target. All other readings are between
97 to 100%.
What could be the problem that is causing such low value. As
i am new to DB ADMIN i request group's help.
My SGA Config is:
shared pool size: 85mb
db_block_size :8192 db_block_buffers :14000
log buffer:524288

RAM size:512MB. ONE PENTIUM III Processor.
thks
clement

Sybrand Bakker

unread,
Sep 2, 2005, 3:17:07 PM9/2/05
to
On 2 Sep 2005 10:44:36 -0700, "clement rajappa"
<clement...@gmail.com> wrote:

>These 2 are way below the 100% target. All other readings are between
>97 to 100%.
>What could be the problem that is causing such low value.

Not using bind variables, not using bind variables, and not using bind
variables.
Read *any* article by Thomas Kyte, and you will find out all about
them. It is his personal hobby horse and rightly so.
In the mean time peak in v$sql to see whether you have any statements
like
select * from emp where empno = 10
instead of
select * from emp where empno = :b1
in the former case your code is causing the behavior you observe.

--
Sybrand Bakker, Senior Oracle DBA

Mark D Powell

unread,
Sep 4, 2005, 11:45:04 AM9/4/05
to
Sybrand has likely hit the nail on the head. If you have a web based
front-end many tools build SQL statements by concatenating the SQL
boiler plate to a variable. That means that nearly every SQL statement
executed is a new SQL statement to Oracle and is not reusable. In this
case the applications should be changed to using prepared statements
with bind variables.

Applications that generate dynamic SQL require parsing. Substitue
static SQL for dyamic SQL wherever possible.

HTH -- Mark D Powell --

Sybrand Bakker

unread,
Sep 4, 2005, 11:50:23 AM9/4/05
to
On 4 Sep 2005 08:45:04 -0700, "Mark D Powell" <Mark....@eds.com>
wrote:

I trust the last sentence should read
'Substitute dynamic sql for static sql wherever possible'
and you do know the difference between the two ; -)

Mark D Powell

unread,
Sep 4, 2005, 7:07:59 PM9/4/05
to
Dynamic SQL is SQL generated at runtime and has to be parsed. Static
SQL used to be the term used in the Oracle Pro*c for prepared SQL which
should allow the reuse of SQL build using bind variables. I think I
got this right. You want to use prepared SQL statements build with
bind variables and avoid dynamic SQl whenever possible.

poddar

unread,
Sep 6, 2005, 9:30:28 AM9/6/05
to

Sybrand Bakker wrote:
> On 2 Sep 2005 10:44:36 -0700, "clement rajappa"
> <clement...@gmail.com> wrote:
>
> >These 2 are way below the 100% target. All other readings are between
> >97 to 100%.
> >What could be the problem that is causing such low value.
>
> Not using bind variables, not using bind variables, and not using bind
> variables.

> Sybrand Bakker, Senior Oracle DBA

Sybrand I am confused.

How can you say that he is not using bind variables from the given
information.
The information says that Soft Parse % is more that 97%.

If bind variables were not used then wont' Soft Parse % would be far
less than 97% ?

The only thing execute to parse ratio being too low tells us that the
system is parsing a lot, that could be normal for a web application
with stateless connection for e.g mod_plsql or a j2ee environment which
does not use statement caching provided by jdbc 3.0.

I am not saying that this ratio too low is not a problem what I am
saying is that we would need more information to determine whether it
is a problem or not for example latch contention information on
library cache latch and shared pool latch.

thanks
amit

poddar

unread,
Sep 6, 2005, 9:46:02 AM9/6/05
to
Parse CPU to Parse Elapsed = 1.48%

Doesn't this tell us that while parsing
for every 68 seconds (over 1 minute) only 1 second was used for parsing
?

If thats true then rest of the time must have been spent while waiting
on latches

library cache(in case of soft parses)
shared_pool latch (in case of hard parses)

even then it is not sufficient to say whether it is hard parsing a lot
or over soft parsing

comp.databases.oracle.tools

unread,
Sep 7, 2005, 5:47:28 AM9/7/05
to
Hi guys
Thks for your support. I guess the full picture of instance efficiency
results from statspack will
help in analyzing better:
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 100.00 Redo NoWait %: 100.00
Buffer Hit %: 97.19 In-memory Sort %: 99.16
Library Hit %: 99.90 Soft Parse %: 99.58
Execute to Parse %: 35.84 Latch Hit %: 99.99
Parse CPU to Parse Elapsd %: 1.48 % Non-Parse CPU: 100.00

So as u see the issues raised are all in the 99% level. Also i am not
working in web environment.
It is a client server env at the branches and connected to the remote
server(Compaq TRU64 RAC) at main office(MO) working on distributed
database concept. Branch transactions are transferred to MO on an
hourly basis.
SGA breakdown difference for DB: ORCSAW Instance: orcsaw Snaps: 2 -3:
Pool Name Begin value End value
Difference
----------- ------------------------ --------------
-------------- -----------
shared pool free memory 40,492,116 40,456,720
-35,396
shared pool library cache 11,763,564 11,778,732
15,168
shared pool dictionary cache 3,136,892 3,136,892
0
Also the queries we are using seems to be fine(with proper bind
variables).

rgds
clement

AnySQL (d.c.b.a)

unread,
Sep 7, 2005, 9:03:04 AM9/7/05
to
1, Using bind variable
2, Cache statement in you application
3, set the cursor_sharing parameter and the session_caches_cursors,
cursor_space_for_time parameter may help.

Statspack some time may not display the right value.

anysql from china
http://www.anysql.net/en/

poddar

unread,
Sep 7, 2005, 9:33:37 AM9/7/05
to
Hi,

Could you post the wait event part of statspack also ?

amit

clement rajappa

unread,
Sep 7, 2005, 3:00:35 PM9/7/05
to

Hi amit
I am indicating the top 5 wait events:
Event Waits WaitTime(cs) %total wait
time
Sql*Net message from dblink 1,134 4,058 90.72
db file scattered read 510 141 3.15
db file sequential read 513 126 2.82
Sql*Net break/reset to client 44 67 1.5
Direct Path Read 247 20 .45

I dont the complete listing as of now, as the next 2 days are off. In
the meanwhile i hope this info will help.
thks and regds
clement

clement rajappa

unread,
Sep 10, 2005, 2:24:40 AM9/10/05
to
Hi
I am attaching the full list of wait events:
Wait Events for DB: ORCSAW Instance: orcsaw Snaps: 2 -3
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> ordered by wait time desc, waits desc (idle events last)

Avg
Total Wait wait
Waits
Event Waits Timeouts Time (cs) (ms)
/txn
---------------------------- ------------ ---------- ----------- ------
------
SQL*Net message from dblink 1,134 0 4,058 36
9.9
db file scattered read 510 0 141 3
4.4
db file sequential read 513 0 126 2
4.5
SQL*Net break/reset to clien 44 0 67 15
0.4
direct path read 247 0 20 1
2.1
log file sync 111 0 17 2
1.0
latch free 40 25 14 4
0.3
direct path write 79 0 13 2
0.7
control file sequential read 37 0 10 3
0.3
refresh controlfile command 6 0 4 7
0.1
log file parallel write 160 0 3 0
1.4
SQL*Net message to dblink 1,133 0 0 0
9.9
SQL*Net more data to client 465 0 0 0
4.0
control file parallel write 233 0 0 0
2.0
db file parallel write 66 0 0 0
0.6
file open 5 0 0 0
0.0
SQL*Net message from client 5,472 0 1,138,103 2080
47.6
SQL*Net message to client 5,471 0 2 0
47.6
-------------------------------------------------------------


i hope this info will help.

thks and regards
clement

podd...@gmail.com

unread,
Sep 11, 2005, 12:29:19 AM9/11/05
to

Hi,

Are you sure you really have a performance issue with the database. Or
you are just trying to eliminate all the wait event ?

amit

clement rajappa

unread,
Sep 11, 2005, 5:26:41 AM9/11/05
to
Basically i was going through the statspack result where i came across
the
low execute to parse issue(1.48%) which was way too low against target
of 100%
So i submitted it to the group which in turn indicated about bind
variables. Again i went back to the stats report to chk the gets and
read related sql statements and found the bind variables of the sql
statements to be in place. That means it is not from bind variables. I
am intrigued as to what is causing these values to be so low.
Now does the wait event which i attached y'day show any discrepancy
like high scattered read or sequential read etc.Pls let me know if u
find anything unusual.
Also is there any material that can shed light on how to interpret
statspack results.
Thks for your help.
rgds

podd...@gmail.com

unread,
Sep 11, 2005, 11:47:54 AM9/11/05
to
hi,

what is the interval of the statapack.

Could you email me you complete statspack at my email address
podd...@gmail.com

amit

Hans.Wijte

unread,
Sep 13, 2005, 5:00:55 AM9/13/05
to
For every CPU second spent parsing your statement(s), your app. is
wating 67.5 seconds for resources; from the top 5 Wait list you've
provided it seems obvious on which event it is waiting.

0 new messages