4 ms·
To have more "persistance", at the sacrifice of speed, you can use the "Append Only File"[1] feature. You can also decrease the time it takes to make a snapshot
by maushu 16y ago
To have more "persistance", at the sacrifice of speed, you can use the "Append Only File"[1] feature. You can also decrease the time it takes to make a snapshot.
To view all data you can use the KEYS pattern command [2]. Like it says in the link, the command is pretty fast ("entry level laptop can scan a 1 million keys database in 40 milliseconds"!) but not recommend for use in production.
The difference is that you don't have tables and have to name the keys properly, this is where the pattern argument of KEYS comes in.
Just name the keys based on this template: <type>:<id>:<field> and you're set.
(eg: Username from the user with id 1001 in the user "table": user:1001:username)
[1] http://code.google.com/p/redis/wiki/AppendOnlyFileHowto http://code.google.com/p/redis/wiki/AppendOnlyFileHowto
[2] http://code.google.com/p/redis/wiki/KeysCommand http://code.google.com/p/redis/wiki/KeysCommand