100-element $in queries appear to be an order of magnitude slower in v2.6.0-rc1 (even with lower_bound patch) than in v2.4.9:
Using the attached code:
v2.4.9:
ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 17 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 7 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 6 Doc count: 10000
RC1:
ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 101 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 82 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 104 Doc count: 10000
RC1 with binary search
ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 103 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 63 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 88 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 102 Doc count: 10000
RC1 with lower_bound:
ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 89 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 37 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 40 Doc count: 10000 ben@zzyzx:~/projects/mongo-utils/build$ ./in_query localhost:27017 100 Total query time in miliseconds: 72 Doc count: 10000
- duplicates
-
SERVER-12952 Regex query performance regression in v2.6.0-rc0
- Closed
- is related to
-
SERVER-13100 Large $in queries are several orders of magnitude slower
- Closed