Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
MongoDB server version: 3.6.0-rc1
-
Fully Compatible
-
ALL
-
v3.6
-
Query 2017-11-13, Query 2017-12-04, Query 2017-12-18, Query 2018-01-01, Query 2018-01-15
-
0
Description
I am doing following aggregation to join two collection using foreign pipeline.
It seems match stage is not using index at all.
db.blogpost.aggregate([
|
{ $lookup: {
|
from: 'comment',
|
let: { blogpost_id: "$_id" },
|
pipeline: [ {
|
$match: { $expr: { $eq: [ "$blogpost.id", "$$blogpost_id"] } }
|
} ],
|
as: 'comments'
|
}}
|
])
|
Attachments
Issue Links
- is documented by
-
DOCS-11203 Docs for SERVER-31760: Lookup sub-pipeline is not using index for equality match
-
- Closed
-
- is duplicated by
-
SERVER-32826 Lookup Pipeline issue performance is very bad in more records
-
- Closed
-
-
SERVER-33364 Combined $match, $expr in aggregation not using indexes
-
- Closed
-
- related to
-
SERVER-31804 $expr rewrite optimization can lead to incorrect query results
-
- Closed
-