Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a very limited experience of database programming and my applications that access databases are simple ones :). Until now :(. I need to create a medium-size desktop application (it's called rich client?) that will use a database on the network to share data between multiple users. Most probably i will use C# and MSSQL/MySQL/SQLite.

I have performed a few drive tests and discovered that on low quality networks database access is not so smooth. In one company's LAN it's a lot of data transferred over network and servers are at constant load, so it's a common situation that a simple INSERT or SELECT SQL query will take 1-2 minutes or even fail with timeout / network error.

Is it any best practices to handle such situations? Of course i can split my app into GUI thread and DB thread so network problems will not lead to frozen GUI. But what to do with lots of network errors? Displaying them to user too often will be not very good :(. I'm thinking about automatic creating local copy of a database on each computer my app is running: first updating local database and synchronize it in background, simple retrying on network errors. This will allow an app to function event if network has great lags / problems.

Any hints and buzzwords what can i look into? Maybe it's some best practices already available that i don't know :)

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You might actually want to check into why a internal network is running so slowly. If a simple select statement is taking 1-2 minutes to complete it sounds like there is something seriously wrong with the network configuration.

As far as your best practice, horsepower on the database server is going to be a good thing. The faster the processor, the more memory the better it handles the work load of processing data. Most databases will run a query once, and then after that it stores it's execution plan for that same query so for everyone after it will be faster.

If you can't do anything about the network configurations, you can always work in a disconnected type enviroment. Probably not the best thing to do if there's going to be a lot of data manipulation. Look into using DataSets for holding your data after it's been pulled from the database.

That's a lot of information, hope it helps some.

share|improve this answer
    
It's 2-3 seconds pings, windows share folder disconnects due to network errors, 20-30 outlook disconnects from exchange per day etc. Just a poor network. –  Eye of Hell Nov 27 '09 at 16:39

If you have

very limited experience of database programming

and it's a

common situation that a simple INSERT or SELECT SQL query will take 1-2 minutes or even fail with timeout / network error.

then your issues probably aren't the network. I would look into gaining more experience in database work, query optimization and coding practices before network issues. IMHO it's much easier to hack together a reasonably sound network (with little to no experience) then it is to hack together a working program with DB access.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.