This question's a little like asking "How scalable are collections?"
Let's just talk about LINQ to objects. Generally speaking, to the extent that most implementations of IEnumerable<T>
iterate over every item in the underlying collection, LINQ has great potential to scale poorly. Create a List<Foo>
that contains ten million items and something like this:
var list = from Foo f in fooList
where f.Value = "Bar"
select f;
is going to be slow. But that's really not LINQ's fault. You're the one that gave it a list of ten million items.
You deal with this the same way you'd deal with it if LINQ didn't exist: by building Dictionaries and SortedLists and the like that help you pare down the search space.
LINQ can improve scalability (well, make scalability easier to get to) via deferred query execution. You can replace a naive method which creates a list, filters it to a new list, filters that to a new list, etc. with a series of LINQ queries:
var list1 = from Foo f in fooList where f.Value1 = "Bar" select f;
var list2 = from Foo f in list1 where f.Value2 = "Baz" select f;
var list3 = from Foo f in list2 where f.Value3 = "Bat" select f;
all of which are executed over a single pass through the underlying collection when (and if) it becomes necessary to iterate over the final list. Again, though, this is nothing new: if you didn't have LINQ, you would probably end up replacing your naive method with one that did the same thing. But LINQ makes it a lot easier.