With Redis DEL command it is possible to delete multiple keys at a time. I am using PHP's Predis Redis client and I am wondering what is a good and what is the maximum amount of keys to delete within one call?
Asked
Active
Viewed 518 times
0
-
1You're free to delete as many keys as you want, as long as your app can tolerate the lockup. Keyword: "your app". – Sergio Tulentsev Oct 08 '17 at 14:38
-
Thanks! And lockup depend on the amount of keys in the database + the hardware performance? Or are there additional factors? – André Oct 08 '17 at 15:01
-
Amount of keys being deleted, plus your server's performance, yes. – Sergio Tulentsev Oct 08 '17 at 15:20
-
So it would be better to run multiple DEL commands with a pipeline after each other than running a big one, so that other operations might be executed inbetween? – André Oct 08 '17 at 18:47
-
Yep, a batch of smaller DEL requests will be run much smoother. – Sergio Tulentsev Oct 08 '17 at 18:58