[erlang-questions] Modifying all entries in a mnesia table

Bob Ippolito bob@REDACTED
Thu Dec 2 05:18:52 CET 2010


You could store the current date as part of the record and simply
treat the value as 0 on read if the date doesn't match the current
date. This will save a lot of I/O and probably won't add too much
complexity.

On Thu, Dec 2, 2010 at 10:01 AM, Andre Nathan <andre@REDACTED> wrote:
> Hello
>
> I have a mnesia table for a quota system. Quotas are specified as daily
> values, so the counters should be reset to 0 every 24h. Is there
> anything more efficient than traversing the table with
> mnesia:{first/1,next/2} and issuing a write for each record?
>
> Thanks
> Andre
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>


More information about the erlang-questions mailing list