Results 1 to 9 of 9
  1. #1
    kulangotski is offline Senior Member
    Join Date
    Feb 2009
    Posts
    117
    Rep Power
    0

    Default 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

  2. #2
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    4

    Default

    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?

  3. #3
    kulangotski is offline Senior Member
    Join Date
    Feb 2009
    Posts
    117
    Rep Power
    0

    Default

    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

  4. #4
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    4

    Default

    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?

  5. #5
    kulangotski is offline Senior Member
    Join Date
    Feb 2009
    Posts
    117
    Rep Power
    0

    Default

    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

  6. #6
    HeapSpace is offline Member
    Join Date
    Jun 2011
    Posts
    20
    Rep Power
    0

    Default

    Perhaps share some of the workload with the database if you're using one that supports stored procedures ?

  7. #7
    kulangotski is offline Senior Member
    Join Date
    Feb 2009
    Posts
    117
    Rep Power
    0

    Default

    well thanks, i will try to do that to see if there would be any improvements in speed

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default

    Quote Originally Posted by kulangotski View Post
    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
    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.

  9. #9
    kulangotski is offline Senior Member
    Join Date
    Feb 2009
    Posts
    117
    Rep Power
    0

    Default

    hey tolls, thanks for commenting out.

    I never really thought how heavy the site is to load it all up. maybe that is the reason because my home internet connection is lame. maybe I would go to do some cleaning up and redeploy.

    thanks for all the comments and suggestions. appreciate it

    regards,
    simon

Similar Threads

  1. Retrieve array inside a list as a Map value
    By Ms.Ranjan in forum Advanced Java
    Replies: 2
    Last Post: 08-04-2010, 12:30 PM
  2. Replies: 2
    Last Post: 11-22-2009, 05:24 PM
  3. Retrieve values of Text boxes using LIST
    By Kayal in forum Web Frameworks
    Replies: 2
    Last Post: 03-20-2009, 11:00 AM
  4. to retrieve multiple values from html page through jsp
    By raghu9198 in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 02-17-2009, 02:43 PM
  5. Replies: 2
    Last Post: 11-09-2008, 10:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •