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 3634204
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:45:00+00:00 2026-05-19T00:45:00+00:00

i have a database. imagine that my database have 1.000.000.000 records or includes 100

  • 0

i have a database. imagine that my database have 1.000.000.000 records or includes 100 gb datas. i want to write a program.

the program basically will send a query to database to take 10 records and will display this records on the screen. then the user will use scroll bar on the mause to change the records displayed. for example when user scrolled down program will display records between 2 and 11. if the user keep scrolling down, the records keep displaying like between 3 and 12, 4 and 13 … also the user can scroll up.

how can i use threads in a program like that. can anyone give a general idea for it. also if i want to use a pattern, which pattern can i use and why?

note: i can also use two buttons (for up and down) instead of scroll bar.

  • 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-05-19T00:45:01+00:00Added an answer on May 19, 2026 at 12:45 am

    A typical pattern would be to have one thread handle the UI. Mouse, windowing, drawing, etc.

    A worker thread would be created that did the actual DB i/o. That thread would collect responses from the database & place them in a buffer (or send them piecemeal) to the UI thread, which would then display them as they came in. Alternately, you could have the UI thread query the worker for a given range of records as the user works with the UI and this would require a way for the worker to respond immediately even if it didn’t have all of the needed data.

    At any rate, keeping the UI responsive while the work is executed is a typical pattern.

    At the DB level itself, there are many ways to break down the execution of the search within the records into multiple parallel tasks (running on independent threads or fibers) doing the actual search requested from your program.

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

Sidebar

Related Questions

Imagine the following: I have a table of 57,000 items that i regularly use
Imagine that you have to query the database in order to retrieve some data
Imagine that I have 100 SELECT queries that differ by one input. A PreparedStatement
I am designing a database with the code igniter datamapper. Imagine that I have
Imagine that I have a table like the below table in my database, how
I have some status data that I want to cache from a database. Any
Imagine we have two tables in the database, user (FK id_role) and role (PK
Imagine you have 2 databases : xpto & zpto. I want to do a
i have database with two values id and val so i want to ask
I have database application, I want to allow the user to restore the deleted

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.