Daniel Castro wrote:
>
> I dont have the source code.
> Is there any other way to do that?
> Any SQL monitoring tool?
>
> Best Regards
>
Hi,
you could enable the diagnose monitor with the command
diagnose monitor read | time | selectivity <unsigned int>
After that you'll find the executed commands in the table SYSPARSEID
and the resource consumption for each command which exceed the given
threshold in the table SYSMONITOR.
The treshold given by the <unsigned int> have different meanings
depending
on the three keywords read, time and selectivity.
Read stands for the amount of pages the command have to read,
time stands for the execution time in milli seconds and selectivity
stands
for the rate of rows qualified / rows read.
If you set more than one threshold the command is inserted in SYSMONITOR
if
one threshold is exceeded.
The table SYSMONITOR will be cyclically overwritten. To adjust the
cycle size you could use the command
diagnose monitor rowno <unsigned int>
The maximum rowno is 9999.
With this join you will get the commands in descending order of their
runtime.
select /*+ordered */
substr(sp.sql_statement, 1, 2000), sm.*
from
sysmonitor sm, sysparseid sp
where
sm.parseid = sp.parseid
order by
runtime desc
I hope this will help you to find the problematic commands.
Kind regards
Holger
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]