• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

it takes longer time to show the report for the first time

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have developed an application using RADS. When i searched for the particular report, it takes pretty much time to load the data from database.
Reviewed the query and found tht it is optimized. Also done jsp precompilation option in RADS.
But still it takes longer time to load the screen. Below is the output in milliseconds. Can anyone guide me on this.

For fist time:

time for Query :: 24391 ms
time for coming out of DAO:: 17968 ms
time for coming out of Servlet :: 23968 ms

For second time
time for Query :: 4391 ms
time for coming out of DAO:: 7968 ms
time for coming out of Servlet :: 7968 ms
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does your query do? Does it create any temporary tables or similar stuff that won't happen the second time? Is there any caching involved? Any more details you can give us?
 
RaviSingh Kumar
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
using query to feteched the data from DB2. No temporary table is used. Fetcing data using simple joins and with some run time parameters.
 
author
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably on the first run all the related data and code gets loaded from disk into the caches, and does any other set-up tasks like opening teh connection, compiling the query etc., and then it runs from memory over the already established connection. It happens everywhere, the first time something runs is always slower. You can try to optimize by keeping as much of existing infrastructure open between the calls and reusing it.
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic