Oracle IN clause with collection of elements
Hi,
I am using a IN clause in Oracle DB to pass a collection of custId to retrieve the customer details. If it was 10 or 50 custId's as a collection in IN clause it
works fine. But if the collection grows bigger to 500 or 1000 then it is pretty slow to load the JSP page with the customer details.
Here is the query:-
select CustName, CustAge, CustCity, CustPin from CUSTOMER where custId IN (....)
The list of custId that is passed through Hibernate query.setParameterList()
How to optimize this query to make sure it displays the customer details faster even if the collection of elements which we pass is huge?
Please let me know your opinion.
Thanks.