-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
Affects Version/s: 1.39.3
-
Component/s: None
-
None
-
Environment:running a javascript with print will write to multi-lines instead of each print on 1 line
-
Not Needed
// long running query
for (i=1; i<=5; i++) {
start = new Date().getTime();
docs = db.customersIndexed.find({
//docs = db.customers.find({
'address.state': 'UT', 'gender': 'Female',
'dob':
,
'policies': { $elemMatch: {'policyType': 'life', 'insured_person.smoking': true }} });
n = docs.count();
//list = docs.toArray();
print( "matched: ", n, "time (ms): ", ((new Date().getTime())-start) );
}
matched:
57
time (ms):
104
matched:
57
time (ms):
122
matched:
57
time (ms):
54
matched:
57
time (ms):
56
matched:
57
time (ms):
-----VERSUS
Atlas atlas-r3h8gs-shard-0 [primary] RICH-QUERY> for (i=1; i<=5; i++) {
... start = new Date().getTime();
... docs = db.customersIndexed.find({
... //docs = db.customers.find({
... 'address.state': 'UT', 'gender': 'Female',
... 'dob':
,
... 'policies': { $elemMatch: {'policyType': 'life', 'insured_person.smoking': true }} });
... n = docs.count();
... //list = docs.toArray();
... print( "matched: ", n, "time (ms): ", ((new Date().getTime())-start) );
... }
(node:10829) [MONGODB DRIVER] Warning: cursor.count is deprecated and will be removed in the next major version, please use `collection.estimatedDocumentCount` or `collection.countDocuments` instead
(Use `node --trace-warnings ...` to show where the warning was created)
matched: 57 time (ms): 242
matched: 57 time (ms): 33
matched: 57 time (ms): 236
matched: 57 time (ms): 33
matched: 57 time (ms): 33
- duplicates
-
COMPASS-6378 Embedded mongosh output is spread onto multiple lines
- Open