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 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.
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.