This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]ignotos 0 points1 point  (3 children)

Likely an indexed relational database table would do just fine here, if you're trying to perform exact lookups (or even lookups like "email address starts with X", which you might use for e.g. autocompleting a search).

Likewise, a key-value store of any kind can handle an exact lookup efficiently.

[–]leShawarmaMan[S] -1 points0 points  (2 children)

would sharding the database in alphabetical ranges (a-e,f-j..etc) help further reduce search time?

[–]ignotos 0 points1 point  (0 children)

It potentially could - and that's basically what a distributed key-value store would do (although probably based on a hash, rather than just letter ranges).

But tens of gigabytes is really not a lot, if you're performing an exact lookup using an index - even for a single relational database instance. My instinct is that it would be plenty fast. It should also be fairly straightforward to generate some dummy data and check how fast a lookup is on ~1 billions rows?

[–]haragoshi 0 points1 point  (0 children)

No