what I mean is this.  write a simple bean to test how long it takes to get all 6K rows 
outside of Tomcat. ie, a bean you can run from your IDE or command line.
Luckily, I already wrote one for the Tomcat performance book and included it in the 
zip file. All you would have to do is change the JDBC properties, provide your sql 
query in a text file and tell it how many iterations you want.
 
it will record the elapsed time to get the resultset. Once you know long that takes... 
you can compare it to your page in Tomcat. It sounds like you're trying to dynamically 
create all the drop downs, which sounds good in theory but is bad in practice. I'll 
give you real example and see if it helps.  I worked at a E-commerce site in the past 
that had a similar problem. On the homepage, they wanted to show all the specials and 
available items. this meant doing quite a few queries to dynamically build a page that 
accurately reflected the inventory.
 
well, the end result of that approach is it ended up taking 6min+ to load the 
homepage. After a lot of negotiating with marketing, and business people, it turns out 
they really only need one part of the homepage dynamic (specials) and the rest could 
be static. There really was no need to run 20 queries to build a page.
 
I don't know if your situation is similar, but if you really need the data to be 
absolutely accurate, then you have no choice. I'm guessing only a small part of the 
data changes every minute. In a situation where you have a lot of data that is 
dynamic, it's better to create a application wide cache that uses events/messaging to 
update the data in Tomcat. Since you're using Oracle, you can write a java trigger, 
which uses JMS to publish a message. JMS will then notify all listening  clients and 
the client will go update itself. I'm guessing the first drop down doesn't have 6K 
options, it's a good idea to break it into discrete pieces.  If you make a persistent 
webapp and have Tomcat load it at startup, you can prepopulate that data. hope that 
helps.
 
peter
 
 vikas yk <[EMAIL PROTECTED]> wrote:
Hi peter

Thanks for your reply.
I didnt get what u meant by testing it with bean
What I did was

recorded the time before I executed the Proc
recorded the time after I got result result set
recorded the time after commenting all the logic I had in
while(rs.next()){} loop.

I need all 6000 rows coz
on my page i am selecting one item in my combo-box and based on 
value i select second combo box on same page gets populated.
Unfortunately there is one value which is creating problem


Any help will be of great help 2 me




On Fri, 21 Feb 2003 Peter Lin wrote :
>
>
>If you're reading out 6K rows remotely, you're limited by 
>bandwidth. Especially if the webserver only has one ethernet card 
>and you're viewing the pages from another client. If you're 
>concerned about performance, I would suggest writing a simple 
>test bean to do the same exact query and time the elapse time to 
>get the data. Then you can subtract the transport time from the 
>total elapsed time.
>Is there a reason you need all 6000 rows? That's a lot of data to 
>view in one shot. If you can break it into pages, or preload that 
>data, it should improve the response time.
>
>peter
>
> vikas yk wrote:I am making call Oracle 
>Function on remote database .
>The values are taken in result set.The numbers of records in
>result set are aroung 6000.
>when I do
>while(rs.next())
>{
>//My logic
>}
>This takes aroung 5 min(300 sec) to get completed
>Now I commented all my logic inside while loop of rs.next()
>
>then also its taking around 4 min (250 sec) to just loop 
>through
>records.
>Is there any way I can minize my time to recurse through
>records.
>
>I am using oracle thin driver to make connection.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: 
>[EMAIL PROTECTED]
>For additional commands, e-mail: 
>[EMAIL PROTECTED]
>
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! Tax Center - forms, calculators, tips, and more



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

Reply via email to