svenxie / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

DBNUM Command #662

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Redis: 2.2.13

Would like the ability to see how many databases are currently being used. I 
know I can get this from INFO but just being able to query and get an integer 
of how many DBs are being used would be nice. Sort of like LLEN you can query 
the number of items in a list.

Another command be good to know which databases are being used as well, since 
it is possible to use DB0 and DB5

Original issue reported on code.google.com by Scot...@gmail.com on 13 Sep 2011 at 6:52

GoogleCodeExporter commented 8 years ago
The database concept in Redis is more or less deprecated.
Usage of databases is discouraged. I doubt any new command
related to databases will be added at this stage, especially
if INFO can be used instead.

Regards,
Didier.

Original comment by didier...@gmail.com on 13 Sep 2011 at 7:48

GoogleCodeExporter commented 8 years ago
I don't have an opinion on adding this feature, but I believe a recent thread 
on the mailing list indicated that databases are not going to be deprecated for 
the single-server case. Have things changed recently?

Original comment by dave.pet...@gmail.com on 13 Sep 2011 at 8:14

GoogleCodeExporter commented 8 years ago
It would be nice to know if the databases are going to be deprecated. I like 
the idea of DB because I can run better statistics on my data because I can 
separate different types of data I am storing. I do think the database number 
in config is odd and didn't understand it at first. Maybe you need that, I 
don't know.

Original comment by Scot...@gmail.com on 13 Sep 2011 at 9:37

GoogleCodeExporter commented 8 years ago
Dudes, databases are not going to be deprecated even if I in the past stated 
that they would be.
The reason is, it is now clear that there are too many apps depending on this 
feature, and I'm now sure that multi DB is not the only feature it is going to 
be NOT supported by Redis Cluster.

So the single node exposes the full API, and Redis Cluster will expose a subset 
of the API, that will not include operations against multiple keys, multiple 
DBs, and so forth. From this point of view multiple DBs are not worth 
deprecating.

About the feature requested here, I feel like now that INFO can be queried into 
different sections, and is thus much faster (only on unstable for now), it is 
not worth exporting this new command.

After all a simpler way to get this effect is to pipeline the following:

MULTI
SELECT 0
DBSIZE
SELECT 1
DBSIZE
SELECT 2
DBSIZE
....
EXEC

Too easy to accomplish client side, and too peculiar.

Salvatore

Original comment by anti...@gmail.com on 14 Sep 2011 at 3:35