This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle data fetch delay

 
Makesh Kumar Ramakrishnan
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are facing significant delay in loading the screen. Most of the delay time is due to data fetching(JDBC) time.

It's a swing application with Oracle 10i database. It's used by our 3 plants in different locations.Database is located at Arizona.
Three plant locations are Arizona,New Mexico and Ohio.

There is no delay in loading the screen for the users accessing from Arizona and New Mexico plants.It takes 4 secs to load the screen. This is expected as there are more data and lot of screen components to load.

But the users in Ohio plant are having problem. It takes 30 secs to load the same screen. The time break up shows that most of the delay is in fetching the data.

What are my options to fix this problem?

Note: We had similar problem in New Mexico plant. But it was solved. I used setFetchSize() function to fix this.

I appreciate your help.

Config:

Database: Oracle 10i
Java : Java 5
JDBC and Oracle thin driver

Thanks,
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makesh,
JDBC code that runs on the same machine as the database server runs considerably quicker than if the JDBC code executes on a remote machine.
So does your JDBC code run on the same machine as the database server?
If not, then I suggest shifting the JDBC code to the database server host machine, storing query results in some serializable data structure and transferring to the remote client.

Good Luck,
Avi.
 
Makesh Kumar Ramakrishnan
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a swing application. So it's definitely not executing on the machine database resides.

Then I have only the second option as you mentioned. If I understood correctly,these are the things need to be done.

Separate the database code from the GUI code. Deploy the database code as a web application. And make a call to web application whenever the swing application needs to get the data from database.

Is that correct?

Or anything else we can do.
 
lavar kaflen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I liked the logic of using jdbc codes in DB Server itself instead of runnning from Application Server.
So, we need to separate the user interface JSF codes in application server with that of jdbc driver loading calls in database server. Never experimented this. So, we need to write codes in new styles and serialize those driver outputs to user fronts to get perforrmance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic