Results 1 to 9 of 9
- 06-08-2011, 01:43 AM #1
Senior Member
- Join Date
- Feb 2009
- Posts
- 117
- Rep Power
- 0
the fastest, most efficient way to retrieve list of values from the db
hi! thanks for hitting this thread.
i was wondering what is the faster or fastest way to retrieve LOVs from the database. like for example, filling up a personal info form. then it has a html select object. that objects shows the list of countries (i guess that is more than two hundred). what i do is retrieve them values when the page loads and it does take a lot of time. AND THEN the user goes to another page that again contains a select that contains list of countries. then i would requery the same things just to populate the select object.
i was wondering what are other things or style or methods that i can try to use to get a LOVs from the database without or decreasing the amount of loading time for my page?
any suggestions would be appreciated
regards,
simon
- 06-08-2011, 05:17 AM #2
Senior Member
- Join Date
- Apr 2010
- Location
- Philippines
- Posts
- 580
- Rep Power
- 4
I do not fully understand your question or what you are trying to do but loading
200 records will not take that long. Have you tried it? If yes and if it take
long kindly post your related code. And how long it takes to load? Are you connecting to
local network?
- 06-08-2011, 06:26 AM #3
Senior Member
- Join Date
- Feb 2009
- Posts
- 117
- Rep Power
- 0
hi! thanks for the response
well I think you understood the question just right. I just stated a single select as an example. but with the application we are currently building, there are a lot of values that are dependent on the database. like occupation, civil status and other LOVs.
what I am doing is when a page loads, It retrieves values to the db and thats every time a page loads. is that even efficient? or are there any methods which i can try to apply?
there are some other things that I suspect that makes application very slow but maybe I can see them some other time
thanks for the response.
regards,
simon
- 06-08-2011, 06:42 AM #4
Senior Member
- Join Date
- Apr 2010
- Location
- Philippines
- Posts
- 580
- Rep Power
- 4
Can you show your code or at least on how you connect to database including query so we can see if there is
somthing wrong. Are you connecting to server on local area network?
- 06-08-2011, 07:03 AM #5
Senior Member
- Join Date
- Feb 2009
- Posts
- 117
- Rep Power
- 0
I am not connecting directly to the database. I am using business components for java as my persistence level I guess, I am not really sure.
As I am developing the web app, I am using the local network (it loads fast). but it was deployed yesterday to our companies site and I tried to connect to it while at home and it took some time. I was thinking that if other people might use it and it will take that amount of time, they would probably just get out of the page.
thanks again for replying
regards,
simon
- 06-08-2011, 09:12 AM #6
Member
- Join Date
- Jun 2011
- Posts
- 20
- Rep Power
- 0
Perhaps share some of the workload with the database if you're using one that supports stored procedures ?
- 06-08-2011, 09:42 AM #7
Senior Member
- Join Date
- Feb 2009
- Posts
- 117
- Rep Power
- 0
well thanks, i will try to do that to see if there would be any improvements in speed
- 06-08-2011, 10:03 AM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
That's nothing to do with getting the data from the database then. Presumably the server is near the database in both cases, so it's entirely down to the connection from your home to the server. Which implies either a slow connection or a large amount of data. Or a mix. Nothing to do with the database.
- 06-08-2011, 02:36 PM #9
Senior Member
- Join Date
- Feb 2009
- Posts
- 117
- Rep Power
- 0
Similar Threads
-
Retrieve array inside a list as a Map value
By Ms.Ranjan in forum Advanced JavaReplies: 2Last Post: 08-04-2010, 12:30 PM -
How do I list values of an arrays in a comma seperted list
By nmvictor in forum New To JavaReplies: 2Last Post: 11-22-2009, 05:24 PM -
Retrieve values of Text boxes using LIST
By Kayal in forum Web FrameworksReplies: 2Last Post: 03-20-2009, 11:00 AM -
to retrieve multiple values from html page through jsp
By raghu9198 in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 02-17-2009, 02:43 PM -
how to retrieve values from a vector which contains different datatypes
By kumar_gemi in forum New To JavaReplies: 2Last Post: 11-09-2008, 10:49 PM


LinkBack URL
About LinkBacks
Reply With Quote
.gif)

Bookmarks