I am testing and benchmarking a couple of embedded dbs using node.js. With TingoDB, anybody knows why this works
var test = { hello:'world' };
for (var j = 0; j < size; j++) {
collection.insert(test, { w: 1 }, function () {})
}
but this not:
for (var j = 0; j < size; j++) {
var test = { hello:'world' };
collection.insert(test, { w: 1 }, function () {})
}
That is, in the first case the database gets filled up with records till size
, while in the second case only 1 entry is added.