Akumuli icon indicating copy to clipboard operation
Akumuli copied to clipboard

Difference in number of records between count function and actual record count

Open ssathasivan opened this issue 7 years ago • 2 comments

Hi ,

We ran some tests on the Akumuli. The corresponding database files are attached below

https://drive.google.com/file/d/0B8ovlYcW7j7Vc1dqclgzZXRfRTg/view?usp=sharing

However we found a strange behavior .

The total number of records returned by the following query - {"select":"a0", "range":{ "from": "1505849400000000000", "to": "1506191399000000000" }} is 486000

However when we run a count function in the same period {"aggregate":{"a0":"count"}, "range":{ "from": "1505849400000000000", "to": "1506191399000000000" }}

We get the total record count as 19249428

Any idea why there is difference. Is there any upper limit on data that we can fetch

ssathasivan avatar Sep 22 '17 17:09 ssathasivan

You have only four volumes. When you writing new data and the database if full Akumuli overwrites the oldest volume. Basically, it overwrites volumes in round robin manner. In your database, each volume was overwritten several times so the oldest values were lost. You can retrieve aggregates for the entire period since they don't require much space but not the values themselves. If you need to store more data you should increase nvolumes parameter in the ~/.akumulid configuration file (by default each volume is 4GB). Then you will be able to delete the old database and create the new one.

./akumulid --delete
./akumulid --create

Lazin avatar Sep 22 '17 21:09 Lazin

Ok... we have changed nVolumes to 0... Just a doubt is aggregate information stored differently

ssathasivan avatar Sep 25 '17 13:09 ssathasivan