This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Time complexity for jdbc connection  RSS feed

 
Ranch Hand
Posts: 32
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was given a task to upload data into tables from files, call a pl/sql procedure, delete the records from the table. create a log file and a error file if any.
The file will come as
Header
Record:a1,a2,,,,,,,
Record:b1,b2,,,,,,,
Footer
Here the Record is the data I need to upload in the table.

I have implemented it in a java program. The java program will be invoked from a shell script. Upto this, it is fine and I am able to do the thing as expected. However the problem comes when there are more number of records. Also the time taken to connect to the database is considerable amount.

I am making the connection using the classes12.jar. For 4 records, the time taken for connection =2 secs(approx) and for processing = 2secs(approx), which mean half the time is taken for making the connection. Is there any way so the connection may be already available when the jvm is loaded when the shell script is run. Secondly, is there any way so that the performance may be improved. The insert I am using is of the form




As per my my understanding that, when control return from main, the jvm exits. In that case no objects could be present. But can there be any way round regarding the time taken to make the connection.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!