--- a/src/modules/db_redis/redis_dbase.c
+++ b/src/modules/db_redis/redis_dbase.c
@@ -1688,12 +1688,6 @@
         if (tmp)
             db_redis_key_free(&tmp);
 
-        // skip if delete all rows
-        if (!*manual_keys_count) {
-          db_redis_key_free (&query_v);
-          goto skipkeys;
-        }
-
         if (db_redis_key_prepend_string(&query_v, "HMGET", 5) != 0) {
             LM_ERR("Failed to set hmget command to pre-delete query\n");
             goto error;
@@ -1785,7 +1779,6 @@
         db_vals = NULL;
         db_redis_free_reply(&reply);
 
-      skipkeys:
         if (db_redis_key_add_string(&query_v, "DEL", 3) != 0) {
             LM_ERR("Failed to add del command to delete query\n");
             goto error;
@@ -2645,6 +2638,7 @@
     } else {
         LM_DBG("no columns given to build query keys, falling back to full table scan\n");
         keys_count = 0;
+        do_table_scan = 1;
     }
 
     if (db_redis_perform_delete(_h, con, _k, _v, query_ops, _n,
