Hi all,
I want to discuss with you my one of scenario and want to know the best practice to make it faster and easy.
Suppose, I have one Users table and I have 15,000 Users available in this table, I have one page in which, I can upload only existing users to assign them something, Now here, I want to check that all uploaded users must be exist in the system,
Currently what I am doing!
I am getting all uploaded users email address and join them by "," and pass through SP.
I having split function in DB and I am checking by IN operator in SQL query.
Like "SELECT * FROM USERS WHERE EMAIL IN(SELECT VALUE FROM SPLITFUNCTION(',',@ALLEMAILS))"
and return all existing users.
suppose, If I have 10,000 users in excel sheet then Is it good thing to collect all email address, combine them in string object and pass it into SP?
Option 2
If I get all users from db then every time it will retrieve 15000 users from DB even if I just want to check only 1 or 10 users.
I want to know the other good options except above two,
Note: can not use cache,cookie, etc to store data in server object,