Jump to content

Database Insertion Loop Execution time


Recommended Posts

I am looking to determine the time it takes to insert each batch (500rows) of data into a database, i.e. the loop execution time. See the block diagram below.

I've place a timer outside the while loop and subtracted it from the timer inside the loop, using shift registers to carry forward the start time. I place the timer in a sequence structure to make sure it starts before the code runs.

When I used this method on a simple example - a while loop with wait function, the loop execution time returned the wait time as expected. But in the database application, the loop execution time value continues to increase. Where am I going wrong?

Thanks in advance,

Lisa
 Database Example Timed.png

Edited by lisam
Link to comment

You should swap the two frames so that you measure the first iteration correctly, but otherwise don't see anything wrong with how you're measuring the loop execution time.

How much increase is occurring?

Your insert and select are in parallel to each other, so there is nothing forcing one to execute first. Is that by intent?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.