Indexing on a fixed-length string (10 characters - phone numbers) for a large number of entries (performance)?
0
votes
2
answers
961
views
I understand that a lot of similar questions have already been asked but I could not find a definitive answer for my question.
Briefly,
- I have to authenticate users using a REST API, with their phone numbers.
- Phone numbers are fixed length (10). can be stored in any way suggested.
- In a table with thousands of phone numbers and the associated **user_id**, I wish to be able to rapidly query the database and obtain the **user_id** associated with a given phone number.
- I read that indexing on strings or random integers is bad.
How should I structure the db to query on phone number most effectively?
Asked by gkm
(9 rep)
Aug 14, 2021, 07:07 AM
Last activity: Aug 26, 2021, 10:46 PM
Last activity: Aug 26, 2021, 10:46 PM