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

  • Home
  • SEARCH
  • 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 8325433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:26:08+00:00 2026-06-09T00:26:08+00:00

What are the principles or implementation involved in making a result set from a

  • 0

What are the principles or implementation involved in making a result set from a database “pageable” ?

How is it possible to page over a million records without storing it in memory? What allows “jumping” from 5 to the 50th page number when there are 100 pages ?

I’m looking for a pseudo-code kind of explanation on how the paging is accomplished.

  • 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-09T00:26:10+00:00Added an answer on June 9, 2026 at 12:26 am

    Basic premise is to remember the following:

    1. Define your page size i.e the number of records per page (PAGE_SIZE)
    2. Know the total number of records in the set. Then you can calculate how many pages there are. var numPages = totalNumRecords / PAGE_SIZE;
    3. Use a variable to track the page number i.e Page = 1
    4. Perform a simple Skip/Take algorithm shown below and you have the elements needed to page

    Skip((page - 1)*PAGE_SIZE).Take(PAGE_SIZE);

    So what will happen is when you hit the data source for results, you will skip to the set of records you want and take the prescribed amount. Hopefully this makes sense.

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

Sidebar

Related Questions

I understand the principles of Coding to Interfaces - to decouple the implementation from
From what I understand of REST principles, URLs should represent a single resource, like
I understand the principles but i have a hard time seeing where the practical
What are good principles in designing a software library for the use of scientists
According to CSS principles when we want to implement reusability of styles we should
After reading the Service Oriented Architecture Principles site and the respective Wikipedia article I
I'm trying to get the principles of doing jQuery-style function chaining straight in my
Are there any known design principles, best-practices and design patterns that one can follow
Am I right in understanding the principles of DAO & Service layer interconnection? DAO
I'm looking for patterns and principles for using with WPF and NHibernate in model-view-controller

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.