question

igor74 avatar image
igor74 asked

monitor insert time with sql profiler

Hi Guys, i want monitor time difference of records between generated by application(timestamp column) and effective time of insert in database. idea is to do this with sql profiler trace on rpc:completed but i am not yet familiar with sql profiler. any suggestions on how to do this would be very welcome !
profiler
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JohnM avatar image JohnM commented ·
Are there two timestamp columns in the table? If not, could you add a secondary one with a default constraint to capture when the record is actually inserted?
1 Like 1 ·
JohnM avatar image JohnM commented ·
I'm not sure I understand. You want to measure how long a record takes to be inserted into a table? Also, measuring RPC:Completed might not give you what you want. That's going to measure a remote procedure call in other-words when a procedure has completed. You could insert multiple records within a single procedure call. Depending on how the procedure is written, you could potentially use sp:stmtcompleted assuming you are inserting records in a RBAR fashion.
0 Likes 0 ·
igor74 avatar image igor74 commented ·
each record has a timestamp included that is generated by the application when a new record is generated. but there is some delay between this timestamp and the effective time of insert (start) so i need to compare the starttime of insert and the timestamp column.
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.