Subject | Re: [firebird-support] tracking progress of a SP |
---|---|
Author | Bill Kranec |
Post date | 2005-03-20T16:16:42Z |
Rick,
A popular way to track procedures is to make a clock table, which has two
columns, action & timestamp. Then use code like the following in your
procedure:
insert into xxxx_clock(action, timestamp) values
('Procedure is starting',CURRENT_TIMESTAMP);
By placing these inserts after critical operations in your procedure, you
will be able to track the progress of the procedure by watching the clock
table. This also allows you to go back and figure out which operations
take the longest.
You may also want to add more columns to keep track of assigned variables
in the procedure.
Hope this helps,
Bill
A popular way to track procedures is to make a clock table, which has two
columns, action & timestamp. Then use code like the following in your
procedure:
insert into xxxx_clock(action, timestamp) values
('Procedure is starting',CURRENT_TIMESTAMP);
By placing these inserts after critical operations in your procedure, you
will be able to track the progress of the procedure by watching the clock
table. This also allows you to go back and figure out which operations
take the longest.
You may also want to add more columns to keep track of assigned variables
in the procedure.
Hope this helps,
Bill
On Sun, 20 Mar 2005, Rick Roen wrote:
>
>
> I was trying to track the internal progress of a SP that was running
> quite slow.
>
> I created an external table, then wrote to the table at various
> points from within the SP and updated using CURRENT_TIME and a note
> field. Of course, as I later learned from the documentation the
> CURRENT_TIME was set at the beginning of the SP and never
> incremented.
>
> I finally figured out what was causing the slow processing, but I
> would like to know for the future if something like this is
> possible. I tried to Google, but only got information as to why it
> doesn't work.
>
> Is there any way to get a real CURRENT_TIME from within a SP?
>
> Thanks,
>
> Rick
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>