<div dir="ltr">Hello,<div><br></div><div>We use mnesia fairly extensively in our application and are interested in keeping track of table growth. We have one very big table thats already sharded and want to know well ahead of time if/when others need to be sharded.</div>
<div><br></div><div>We started with a fairly simple approach of calling mnesia:table_info(Tab, memory) on each table on a regular interval. It seems that for disc_only_tables mnesia defers to dets:info/2 and for disc_copies or ram_copies mnesia defers to ets:info/2. dets returns the size in bytes and ets returns the size in words. We noticed that the words returned by ets didnt match up with the file sizes on disk when converted to bytes. This got us wondering a little more about the different file types -- DAT for dets and DCD/DCL for disc_copies. We also noticed that if you called dets:info(Tab, memory) on a disc_copies table it returned undefined. I was always under the impression that a disc_copies table used ets and dets under the hood but, after looking at the mnesia code that doesn't seem like the case.</div>
<div><br></div><div>So my first question is, do tables with a storage type of disc_copies use dets? If so, are they limited by the same 4GB limit that dets is? If so, how can I properly measure the size on disk of a disc_copies table.</div>
<div><br></div><div>Thanks in advance</div><div><div><br></div>-- <br>Noah
</div></div>