Hi! SELECT is among the fastest Redis commands! Maybe your delay is
due to FLUSHDB?
Btw there is currently no firm plan to remove SELECT, since there is
the possibility that adding a command to swap databases on the fly
could provide some impressive advantage for some use case. In other
words Redis cluster will NOT support SELECT and multiple DBs but it is
not clear if it will be supported in the single-instance case or not.
Cheers,
Salvatore
--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele
On Thu, Jun 30, 2011 at 6:03 PM, Dean <deanw...@gmail.com> wrote:Hi! SELECT is among the fastest Redis commands! Maybe your delay is
> Redis.io doesn't list time complexity for SELECT. Based on some
> topical observations, it looks like SELECT tends to be heavy. Is
due to FLUSHDB?
Btw there is currently no firm plan to remove SELECT, since there is
the possibility that adding a command to swap databases on the fly
could provide some impressive advantage for some use case. In other
words Redis cluster will NOT support SELECT and multiple DBs but it is
not clear if it will be supported in the single-instance case or not.
If/when it goes, we'll manage - but we're fans of it :)
Marc
(stackoverflow)
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
Thanks for all the positive feedbacks about SELECT... the reason I
wrote that I'm reconsidering the dropping of SELECT is that in general
I learned how to don't care and love the bomb: in practice I'm no
longer trying to make sure that the cluster and single-node versions
of Redis are going to be similarly featured. This shift is clear if
you read the Redis Manifesto ;)
---------- from the manifesto -----------
6 - Two levels of API. The Redis API has two levels: 1) a subset of
the API fits naturally into a distributed version of Redis and 2) a
more complex API that supports multi-key operations. Both are useful
if used judiciously but there's no way to make the more complex
multi-keys API distributed in an opaque way without violating our
other principles. We don't want to provide the illusion of something
that will work magically when actually it can't in all cases. Instead
we'll provide commands to quickly migrate keys from one instance to
another to perform multi-key operations and expose the tradeoffs to
the user.
----------------------------------------------------
So basically if we are no longer going to unify it is a shame to drop
it. But if we take it, I would like to have two additional features.
1) Ability to programmatically swap two DBs:
SWAPDB 0 1
and in no time the DBs will be swapped (just by pointer).
2) A lazy version of FLUSHDB, like "FLUSHDB 10 LAZY", that is able to
don't stop but will remove objects in the background incrementally.
This may make the ability to have multiple DBs an important advantage
to model some kind of problems.
Client libraries could optimize this by filtering out redundant selects.
In that case it wouldn't cost anything to issue extra selects... Not
sure if any libraries do so right now, but it would be a nice
improvement otherwise. Anyone who knows how client libraries handle this?
Hampus
Obviously each client needs to handle this separately.
Marc
Just some thoughts,
Marc
The SELECT command basically just updates a pointer, so it should take