prajesh
15th February 2002, 08:07
Hello

can anyone help me out .....

when I run a particular session I want to monitor peformance the sql queries. By Using TT_SQL_TRACE we can do it.

But I dont know How to do it.

As I had seen in of your posted answer the below output

Tracing on: TT_SQL_TRACE = 0200
================================================
Fetch times of Query (QID : 1) Trans 1 (bshell(main)) in SqlBreak :

select count(*):list_size
from ttdsk355


------------------------------------------------
Nr Rows Fetched : 1
Fetch Time for 1st Row : 0.030 sec
Total Time : 0.030 sec
================================================
================================================
Fetch times of Query (QID : 2) Trans 1 (bshell(main)) in SqlBreak :

select ttdsk360.*
where
(ttdsk360.user = :logname$ or ttdsk360.user = :1)
order by ttdsk360.user desc, ttdsk360.cpac desc,
ttdsk360.rsst desc, ttdsk360.rsid desc

------------------------------------------------
Nr Rows Fetched : 180
Fetch Time for 1st Row : 0.080 sec
Max Fetch Time : 0.080 sec
Average Fetch Time : 0.000 sec
Average Fetch Time (except Max) : 0.000 sec
Total Time : 0.080 sec
==============================================
==============================================

so here my point is to get the output as above for my particular session.
could you pls send me tell me the step by step procedure
It will be very helpful for improving the performance of some sql
queries.

pls mail me to this mail id tp12345in@yahoo.com

Thanks in Advance

Regards
Rajesh.

Han Brinkman
15th February 2002, 10:05
The output is stored in the bshell.<pid> by default.

You can change the location by specifying:
-keeplog -logfile <path/name>

Han

dmcgrath
18th February 2002, 18:52
Following on from what Han has mentioned the full command line would be:-

-- -set TT_SQL_TRACE=0200 -logfile <filename> -keeplog

example

-- -set TT_SQL_TRACE=0200 -logfile trace - keeplog

where 'trace' is the filename of the logfile

Note the above is for Baan Windows Interface and is set in BW configuration.

Another useful tracing tool is DBSLOG which can be used on it's own or in conjunction with TT_SQL_TRACE

command line would be

-- -set DBSLOG=<trace code>

example

-- -set DBSLOG=0020

0020 = Table action information

this will create a log file called dbs.log

hope this helps

DLM

victor_cleto
19th February 2002, 12:20
See the thread http://www.baanboard.com/baanboard/showthread.php?s=&threadid=95 for a full description of the options for TT_SQL_TRACE
You can add the values, like, a 240 will do a 000040 (show queries wih their QID) plus a 000200 (show query exec. times)

dmcgrath
20th February 2002, 16:19
I have attached a copy of the 'TRACING - Between client and server, server and database, within the bshell, tracing a core dump' version 1.0 Feb 1999 document

This is a 89 page document that covers just about everything you need to know about tracing. I have been informed that a updated version of this document is in the pipeline and I expect to get my hands on this a few months.