Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Suggested schema/storage to do quota and rate limiting

I would like to enforce quotas on a perUser and perResource basis. If I stored it in a relational database it would look something like:

resource_name      user_id         ip          timestamp
add_item           127             1.7.283.1   1029292929000

This would work fine, but I'm afraid the count operations would be quite slow, as relational databases aren't the most performant when it comes to counting on large tables. What would be a better solution for this?

Comments