Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slow performance using MyODBC

Status
Not open for further replies.

dave755

IS-IT--Management
May 3, 2001
69
US
Hi All,

I am creating a pair of applications that essentially transfer data from a remote client to a local server. The trick is that "remote" in this application means "way out in the mountains where it takes an hour by four wheel drive to reach the nearest paved road and don't even talk to me about a cell tower for another hour or so of driving".

Because of this, we are using shoe-leather-net to communicate between the client and the server. The client is collecting data into a MySQL table. Every so often, a person will use the client application to copy the data onto a thumb drive and carry it down the mountain to the server, where the partner application will copy the data into an identical MySQL table. These are distinctly non-technical people I am talking about here - typing a file name is a high-skill activity - so this needs to be a dead-simple user interface.

The data is sensitive, so it is encrypted going on to the thumb drive and decrypted coming off.

Here is the question: The copy process that I have programmed is very slow - on average 2 seconds per row - on both ends of the transaction and this does not seem right. What can I do to improve it?

When the process is running, Task Manager shows that mysqld-nt is using as much of the CPU as it can get and the actual application is only using CPU time once in a while.

The basic client task is this:
-- Read a row from the local table
-- Encrypt the row
-- Write the encrypted row to the file
-- Repeat until all of the unexported data has been copied

The basic server task is the inverse:
-- Read a line from the file
-- Decrypt the line and construct a corresponding INSERT statement
-- Execute the INSERT
-- Repeat until end-of-file

Other possibly pertinent information:
-- Windows XP Pro
-- Visual Basic.Net
-- MySQL 4.1.14-nt
-- MyODBC 3.51.13

Dave Gee
 
Might be worth exploring MySQL's own encryption functions. Try:

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Can you post a code/command you are using now ?

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top