04-09-2020 09:03 AM
I have an application in Labview and use the mySQL database, a communication made with the database of DB tools, but when I enter data in the program it takes about two seconds. My computer has an Intel core I5 processor and 8GB of RAM.
Can someone help me please?
Forgive me for my English, I'm Brazilian.
04-09-2020 09:06 AM
Without any more information it's impossible to answer. Post your .vi so we can see if there's any obvious mistakes.
04-09-2020 10:13 AM
database inserts are normally very quick. how many records are you trying to insert? how does the time compare with an insert done by another program (this will help determine if the problem is on the server side)?
04-09-2020 10:44 AM
My application is very complex, so I did a VI to test the communication tool with the database. But even so, execution is delaying. I tested the insert method and the select data, both presenting the same problem.I am inserting a constant cluster for testing purposes only.
04-09-2020 10:59 AM
first thing... your timed loop is set to only run once per second (dt =1000), so you can't actually perform DB inserts any faster than that. not sure if your full program has the same problem. Don't use a timed loop, but an event structure set to respond to a button's value change event.
04-09-2020 11:32 AM
I use the timed loop with one second is why I really want my updates in the bank every second. I even changed the time loop for a normal while loop, but even then the delay continued, it's as if the VIs in the database had an internal delay.
04-09-2020 11:39 AM
in that case, I highly recommend you perform a similar insert using sql server management studio to see if the problem is external. in my experience, DB inserts via LabVIEW were normally < 100 ms.