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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:28:21+00:00 2026-05-19T10:28:21+00:00

I need to allow users to browse a table, with >1 million entries, by

  • 0

I need to allow users to browse a table, with >1 million entries, by the first letter in the title.

I want them to be able to browse by every letter from A-Z, 0-9 in a list together and all other characters together.

Since it’s a big database and it is to be displayed on a website, I need it to be efficient. Regex does not use index, so that would be too slow.

Is this possible or will I have to rethink the design?

Thanks in advance

  • 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-19T10:28:21+00:00Added an answer on May 19, 2026 at 10:28 am

    Create links representing every letter and number. Clicking these links will provide the users with the results from the database that begin with the selected character.

    SELECT title FROM table
    WHERE LEFT(title,1) = ?Char
    ORDER BY title ASC;
    

    Consider paginating these result pages into appropriate chunks. MySQL will let you do this with LIMIT

    This command will select the first 100 records from the desired character group:

    SELECT title FROM table
    WHERE LEFT(title,1) = ?Char
    ORDER BY title ASC
    LIMIT 0, 100;
    

    This command will select the second 100 records from the desired character group:

    SELECT title FROM table
    WHERE LEFT(title,1) = ?Char
    ORDER BY title ASC
    LIMIT 100, 100;
    

    Per your comments, if you want to combine characters 0-9 without using regex, you will need to combine several OR statements:

    SELECT title FROM table
    WHERE (
        LEFT(title,1) = '0'
        OR LEFT(title,1) = '1'
        ...
        )
    ORDER BY title ASC;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to allow users to upload PDF documents that other users will read.
I need to allow users to select an assembly in much the same way
Well behaved windows programs need to allow users to save their work when they
I am building a web application that will need to allow users to save
I have an Excel 2007 ODBC connection defined and I need to allow users
I have a need to allow my users to execute .NET code that they
I need an easy way to allow users to upload multiple files at once
I need to implement a functionality to allow users to enter price in any
I need to develop a CRM system which will allow users to have a
I need to modify the open-source FCKeditor (not CKeditor) to allow users to select

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.