Does LINQ skip and take decent performance?

We have a query for about 40 customer related data fields. A query will often return a large number of records, say, up to 20,000. We want to use only about 500 results. Then we just want them to be able to scroll through them 10 at a time.

Is LINQ skipping and taking a reasonable approach for this? Are there any potential performance issues when using this approach, instead of doing it manually in some other way?

+3
source share
2 answers

Take()without Skip()generates SQL using a clause TOP.

Take() Skip SQL ROW_NUMBER(), .

, LINQPad LINQ to SQL .

+6

, SQL Server 2005+, SQL, ROW_NUMBER(), ( SQL, ).

+2

Source: https://habr.com/ru/post/1763728/


All Articles