Re: TRACE CURRENT in SPL
Posted in 1997
Jeff...the short answer is no. This behavior is a "feature", and not subject to change. I tried reporting it as a bug once. The rationale I was given was that a SP is logically an atomic piece of SQL, thus only one CURRENT Time, which is implemented as SP begin time. Personally I think it's pretty lame that there is no way to get the real CURRENT time in a SP, but there it is. On further reflection, I did once dream up a "half-vast" (as the car guys say...) workaround as follows: system "echo `date` - Entering program5 >> trace.log"; to write timestamps to a file as various code segments were entered/exited. You could probably modify it to substitute some variables and write to a file. The ` ("graves end" I'm told it's called...) is important to get the unix date command to resolve (under solaris at least). BTW, Under V7 (but not V5, go figure...) when we "trace on" to trace everything in sight, the thread slows to a barely perceptible crawl, very little CPU consumed, very little work done. To a lesser extent, you will probably have some, maybe a lot of skewing by using Trace, watch it closely with and without. I wouldn't trust any performance measurements made with trace unless I verified skewing (perturbation??) was minimal as you are using it. I tried reporting this as a bug too, and basically got stonewalled, finally gave up, wasn't important enough to fight over. This too happens entirely too frequently. I don't even bother calling anymore unless I'm willing to fight to the bitter end over a problem. Greg My opinions are of course, purely my own... Jeff Craig wrote: > > I am trying to track the number of updates completed > by a stored procedure in a given time period, so I > tried to do the following: > > ...snip > > SET DEBUG FILE TO '/tmp/trace.log'; > TRACE OFF; > > TRACE ":" || CURRENT || ": " || UpdateTotal || " rows updated so far..."; > > ...snip > > The TRACE is getting written out, but CURRENT isn't getting the current > time, merely reports the time the procedure started. > > Is there anyway to output the actual current time? > > Thanks! > > ------------------------------------------------------------------- > Jeff Craig | dbINTELLECT Technologies, Inc. > Senior Consultant | Golden, CO > | (303) 275-6954 ext. 8008 > | email: settler@dbintellect.com > | fax: (303) 275-2134 > -------------------------------------------------------------------