Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8786977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:46:09+00:00 2026-06-13T21:46:09+00:00

I am implementing paging using LINQ, and i was thinking about the performance issues

  • 0

I am implementing paging using LINQ, and i was thinking about the performance issues that i could encounter. Lets say i have a page size of 10 and i have 100 records in a table.
If i were to use the following

var myList = _dataContext.Person.Skip(PageNumber * PageSize).Take(10);

it will get me the data i want. now if i were to take this scenario, and apply it to 1,000,000 records. will this affect the performance? Would it be much more worth using an sql stored procedure, performance wise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:46:11+00:00Added an answer on June 13, 2026 at 9:46 pm

    Stored procedures do not have any advantages over plain SQL text, which is generated for you by Linq provider.

    BTW for your query something like following SQL will be generated

    SELECT /* [t0] fields */
    FROM (
        SELECT ROW_NUMBER() OVER (ORDER BY /* [t0] fields */
        FROM [Person] AS [t0]
        ) AS [t1]
    WHERE [t1].[ROW_NUMBER] BETWEEN @p0 + 1 AND @p0 + @p1
    ORDER BY [t1].[ROW_NUMBER]
    

    And it will be executed only when you will use myList variable (e.g. call ToList(), Count(), enumerate it). Thus it does not matter how many persons you have in database (well, matter, but this is db part, not objects in memory), and you will not have performance boost from usage of stored procedure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm following this tutorial here: http://brenelz.com/blog/implementing-paging-using-php-and-jquery/ Here is what I have: http://eataustineat.com/testingfolder/ I've encountered
I am using the pager provided by Martijn Boland to implementing paging in my
I am implementing a search module with result page support paging. The example provided
I am implementing slideshow. I have two options for paging between images: 1) to
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written
The implementing-result-paging-in-hibernate-getting-total-number-of-rows question trigger another question for me, about some implementation concern : Now
I am currently implementing a client-side paging solution using ASP.NET, jQuery and JSON. I
Anyone Please help me in implementing Paging in my project. I have nearly hundred
I have a Telerik RadGrid in which I'm implementing custom paging binding to a
I have a very large (77 actions) controller that I am using to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.