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
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.
Consider paginating these result pages into appropriate chunks. MySQL will let you do this with
LIMITThis command will select the first 100 records from the desired character group:
This command will select the second 100 records from the desired character group:
Per your comments, if you want to combine characters 0-9 without using regex, you will need to combine several
ORstatements: