wood burning stoves 2.0*
The moose likes JDBC and the fly likes connection very slow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connection very slow" Watch "connection very slow" New topic
Author

connection very slow

Fabio Lucci
Greenhorn

Joined: Dec 01, 2005
Posts: 2
hi, i have a java application and I have import some data from a csv file.
These data update some field in a Access DB.
For update the db I use:

s.executeUpdate("UPDATE TableOrders SET WEEK = "+nweek+" WHERE Order = '"+norder+"'");

My problem is: if I run my application on my computer (P4 - 1gb RAM - OS windows xp) and I import the file ... only 5 seconds and all data are in db if I use another computer (for example my notebook M 512 Mb RAM - OS windows xp) the importation is very very slow (1 hour).

I think the problem is "UPDATE" because if I cancel the line with UPDATE the program don't have any ploblems.

I don't understand because the DB is the same and the OS yet.

Thanks for help
[ December 01, 2005: Message edited by: Bear Bibeault ]
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3700
    
    5

I'd recommend turning on a database profiler to detect where the bottlenecks are. It could be the number of connections you are making, the network time to transmit the database, or the number of records being affected by each query. A profiler would give you a better view on this, especially one that can suggest indexes to improve your time.

BTW, if you are making a lot of calls, I would definitely package them into a single database call where appropriate. Stored procedures can be helpful for this.


My Blog: Down Home Country Coding with Scott Selikoff
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: connection very slow
 
Similar Threads
wierd performance in tomcat/java: help consult
Access Compute Name on windows XP
Eclipse: Minimum Memory Req. under Windows Me
Windows XP - Oracle8.1.5 - RMI