• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

reduce querying ODB

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai,
I have a oracle 8i database consisting of 10000 records in a table,
Now i have to check nearly more than the number of records wether the specified record is there in database or not.so what i do is every time i make the query and check in the database. Is there any method to reduce my program execution.
Even if i store table in temp array and check for the necessary condition, full array[1000][] have to be searched and i think the time taken to query the database and accessing the whole array will not make much difference.
hope for better suggestion from u all.
thanx
prabhakar.
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could add indexes to the DB if you haven't done it yet, or you could use HashMap for accessing by the key if you have some some unique keys. If thet is still to slow - try making some "smart" object which is going to contain only 1000 most wanted or recently used records. And if the record is not in the memory then query database.
reply
    Bookmark Topic Watch Topic
  • New Topic