This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "connection very slow" Watch "connection very slow" New topic

connection very slow

Fabio Lucci

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: 3753

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.

[OCA 8 Book] [Blog]
I agree. Here's the link:
subject: connection very slow
It's not a secret anymore!