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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:07:04+00:00 2026-05-31T14:07:04+00:00

I am trying to include in a MYSQL SELECT query a limitation. My database

  • 0

I am trying to include in a MYSQL SELECT query a limitation.
My database is structured in a way, that if a record is found in column one then only 5000 max records with the same name can be found after that one.

Example:

mark
..mark repeated 5000 times
john
anna
..other millions of names

So in this table it would be more efficent to find the first Mark, and continue to search maximum 5000 rows down from that one.

Is it possible to do something like this?

  • 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-31T14:07:06+00:00Added an answer on May 31, 2026 at 2:07 pm

    Just make a btree index on the name column:

    CREATE INDEX name ON your_table(name) USING BTREE
    

    and mysql will silently do exactly what you want each time it looks for a name.

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

Sidebar

Related Questions

I am trying to execute mysql select insert query as below. INSERT INTO ACCOUNTS.TABLE1
I am trying to include a value from a database table within the value
I'm trying to include an EPS figure in a document that will be compiled
I am trying to include the library StringEscapeUtils and everything that I can find
I am trying to include a Facebook like button iFrame that has PHP in
I'm trying to fetch from a MySQL Database using PHP and at the moment
I am trying to convert a mySQL query into a JSON object. This works:
Alright then I'm having an issue when trying to fill a dropdown with MySQL
I'm trying to insert via checkbox, but it saves only one record, suppose in
I've just set up a MySQL database on a web-hosting service and I'm trying

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.