You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Range searches perform slow even if the index is created for those searches. I tried range query using the example code from Indices & Performance doc chapter:
var db = new ForerunnerDB(),
names = ['Jim', 'Bob', 'Bill', 'Max', 'Jane', 'Kim', 'Sally', 'Sam'],
collection = db.collection('test'),
tempName,
tempAge,
i;
for (i = 0; i < 100000; i++) {
tempName = names[Math.ceil(Math.random() * names.length) - 1];
tempAge = Math.ceil(Math.random() * 100);
collection.insert({
name: tempName,
age: tempAge
});
}
collection.ensureIndex({
age: 1
});
var explained = collection.explain({
age: {
'$gte': 30,
'$lte': 40
}
});
'Explained' object has tableScan: 100000 as if no index is used.
The text was updated successfully, but these errors were encountered:
It is a critical feature for me. I've tried to dig into the code in a hope to implement it by myself, but it is not easy. The key is the Path concept used everywhere in the code. For now I choosed to abandon the forerunnerdb in a favor of mongodb that supports such a feature. Yes it doesn't work in a browser and it constrains me a lot, but better have something on the server side only, instead of having nothing everywere ;-(
This fix is on the roadmap for 1.4.0. The paths system isn't likely to require changes, only the way the indexes are detected against the query and the code that can understand how to query that index based on a range search.
Also please note that ForerunnerDB is still young and enhancements are being made regularly! :) It is not meant to replace MongoDB but rather compliment it so it's good you are using Mongo 👍
Range searches perform slow even if the index is created for those searches. I tried range query using the example code from Indices & Performance doc chapter:
'Explained' object has tableScan: 100000 as if no index is used.
The text was updated successfully, but these errors were encountered: