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
Just tested your database to see if it's suited to be embedded in our app.
We have a collection of users and each user can have one or more email addresses. So we created a field emails as an array of strings
We did a search without index on emails field and with index on emails field and the duration is roughly the same around 170-180ms for a 15k+ documents collection.
Does array index really work because I didn't saw any speed improvements with or without index. Tested also unique vs non unique index and the same result.
If we create a field email of type string (not array) the index works: 30-40ms with index vs 180-190ms without index.
Tested in java , version 4.3 with rocksdb module.
The code we did the test is
long start = System.nanoTime();
collection.find(where("emails").elemMatch($.eq("[email protected]"))).forEach(System.out::println);
long end = System.nanoTime();
Log.info("Time taken: {} ms", (end - start) / 1_000_000);
The text was updated successfully, but these errors were encountered:
Just tested your database to see if it's suited to be embedded in our app.
We have a collection of users and each user can have one or more email addresses. So we created a field emails as an array of strings
We did a search without index on emails field and with index on emails field and the duration is roughly the same around 170-180ms for a 15k+ documents collection.
Does array index really work because I didn't saw any speed improvements with or without index. Tested also unique vs non unique index and the same result.
If we create a field email of type string (not array) the index works: 30-40ms with index vs 180-190ms without index.
Tested in java , version 4.3 with rocksdb module.
The code we did the test is
The text was updated successfully, but these errors were encountered: