• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Time complexity for jdbc connection

 
Ranch Hand
Posts: 32
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic