I am having around 1000 different id's for which I need to run the below hibernate query as many times. Based on the records retrieved (the record need not be present) , I do a bit of processing before entering it in another table.
The issue here is the whole process of retrieving the records takes approx 20-25 sec. Is this normal? Can the query be tweeked further to reduce the time?
(The below hibernate query will be executed for each id)
String query = "select emp from Employee emp where emp.id = '"+id"' and emp.status.statusCd = 'A'";
Note: Employee is a table with around 30 columns. status_cd and id are VARCHAR.