aspose file tools*
The moose likes JDBC and the fly likes reduce querying ODB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "reduce querying ODB" Watch "reduce querying ODB" New topic
Author

reduce querying ODB

varkala prabhakar
Ranch Hand

Joined: Sep 08, 2001
Posts: 54
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.
Vladimir Ergovic
Ranch Hand

Joined: Apr 22, 2001
Posts: 63
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.

Vladimir Ergovic
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reduce querying ODB
 
Similar Threads
need advice
records not showing in ResultSet
Transfering Large Data from server to client
optimization of database
Fetching nK records in batch from client side?