1

I have a use case where I need to obtain number of bytes for all the keys that match a regular expression.

  • Is there a functionality similar to like sizeof(keysmatch:*)?
  • If so, would that include size for all types of keys (sets, lists, etc)?

I understand I can use MEMORY USAGE key, however, I would need to pipe it to get all the values. Is that the best way?

From my understanding DBSIZE returns only the key count. Is there a functionality that returns the size of the db?

1 Answer 1

1

Is there a functionality similar to like sizeof(keysmatch:*)?

NO. AFAIK, you have to use MEMORY USAGE.

Is there a functionality that returns the size of the db?

You can use MEMORY STATS to get the memory usage of the whole database.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.