I am trying to use LINQ for certain operations. So there may be chance that millions of record will be used in LINQ.
So is it worth to use LINQ in this case? what is the maximum object limit to use LINQ?
I am reading records from database and check some conditions and store in List<Result>. Result is a class. Then performing LINQ query in List<Result> like grouping, counting etc. So there may be chance that min 50,000 records in List<Result>, so in this whether its better to go for LINQ (or) reinsert the records to db and perform the queries?
It depends what you are doing with it. If you are only using it to construct queries for something else to process, for example Fluent NHibernate, then linq will never see the objects themselves, so won’t be a factor.
If you’re using linq to objects with millions of objects, you might want to avoid loading all of the objects into memory at once. In which case, you’ll want to only use lazy linq queries. Jon has a good overview of the issues in his article Just how lazy are you?