Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to make a faster connection to a database?

843859Sep 30 2006 — edited Oct 2 2006
Hi there,

I have a created sth like an ebook reader for html books. I have a highlight tool and a textfield to keep some notes for each page. When the user goes from one page to there other I do connect and disconnect to the database 4 times. One to save the highlights of the page, one to save the notes and another to load these in characteristics to my new page.

Acutally I do sth like this:
      //Save the highlights and the notes of the current page
      no.saveNotes();
      hi.saveHighToDB();
            
       // Load and display specified page.
       ViewClass.getEditorPane().setPage(pageUrl);
       
       //Load the highlights and the notes of the new page
       hi.loadingMakeHighlight();
       no.LoadNotes();
This make my program very slow. It takes along time to load the new page. The whole program, database and book run locally so it should be faster 'cause afterwards I want to put in the book and the database on a server.

Is there a way to make less connections or sth to make it faster??
Is it better/faster to make 1 connection to save the 2 things and 1 to load them? The saveNotes() and LoadNotes() are in the same class and the saveHighToDB() and loadingMakeHighlight() are in a different one. How I can solve this?

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 30 2006
Added on Sep 30 2006
1 comment
137 views