

The bigger they are, the harder they f(etch)all - itamarhaber
http://redislabs.com/blog/i-have-500-million-keys-but-whats-in-my-redis-db

======
dfc
This is a first: a title change that is dramatically less informative than the
original title. Please do not change the title of submissions. The guidelines
are fairly clear on the policy and all you end up doing is making more work
for "the ever vigilant deity of community goodness and truth in titling," aka
dang.

    
    
      > please use the original title, unless it is misleading or linkbait. 
    

[http://ycombinator.com/newsguidelines.html](http://ycombinator.com/newsguidelines.html)

~~~
itamarhaber
Sorry - no intent to mislead here... we were debating internally between the
two titles and although we finally opted for the 500M one, I guess I liked
this one better and it stuck in my subconscious, hence the submission.

The original title: I Have 500 Million Keys But What’s In My Redis DB?!?

------
andrewvc
Doesn't this point to a design issue with redis? The single threaded, blocking
operation of it _works_ , but it seems to present more problems than it solves
for a large quantity of use cases. While it works, and works quickly for a
narrow range of use cases, it comes at a huge loss in flexibility when
compared to an SQL DB.

While I think it is possible to use redis well, I'm at a loss for what redis
does for the _average_ user, that a decent use of SQL doesn't do. My gut
feeling is that if people would spend 30 minutes reading up on how to read a
postgres query plan maybe they wouldn't reach for redis so quickly.

~~~
lmm
For a simple "fetch one row by pkey" lookup a traditional SQL DB spends
something like 2/3 of the execution time _parsing the SQL_. So using a binary
protocol's always going to win on performance.

(You may be right, maybe the main value of redis is as a way to work around
stupid corporate/DBA policies? I know in theory I could have a single table
key / json value in Postgres, but I've never found a company willing to
actually do that. Whereas in Redis it's "no, I can't define a schema for the
data, because the tool doesn't have one.")

~~~
andrewvc
You are 100% right about the perf there, but most people don't really need to
optimize those lookups, they just like to because engineers like shiny things.

~~~
lmm
I think it's more that engineers are (rightly) lazy. Redis feels very simple -
install it, run it, do your key/value operations.

------
euphemize
From the example:

    
    
      Size range
      0-49
      600-649
      ...
    

Why does the range skip from 0-49 to 600-649? I'm not sure I get this.

~~~
itamarhaber
An alternate explanation (and in this case also the real one :)) is that the
database doesn't have any keys at that specific size range.

~~~
euphemize
Ah! heh, thanks for the clarification - I somehow expected it to have a row,
with a count "0" :)

