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 ]
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.