[SERVER-12376] $skip and $limit should be moved before $project Created: 16/Jan/14  Updated: 03/Jul/16  Resolved: 23/Jul/15

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Performance
Affects Version/s: None
Fix Version/s: 3.1.5

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: James Cohan
Resolution: Done Votes: 0
Labels: dnsf, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-19152 Reorder $project to be after limits a... Closed
Related
is related to SERVER-4506 aggregation: optimize by pushing mat... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

While this is performance-neutral on its own, it enables other optimizations such as combining sort and limit. This should probably be done right before Optimizations::Local::moveLimitBeforeSkip.



 Comments   
Comment by Mathias Stearn [ 22/Jun/15 ]

james.cohan At least 2 should be done under a separate ticket. If we don't get to 1 in this iteration, it should probably be pulled out and handled as a separate ticket.

Comment by James Cohan [ 18/Jun/15 ]

Leaving this ticket open for now. We still want to do two things:
1. Combine logic for all pipeline optimizations that involve swapping stages into one function.
2. Prevent $project's from being sent to shard and merge pipes.

Comment by Githook User [ 18/Jun/15 ]

Author:

{u'username': u'jamesfcohan', u'name': u'James Cohan', u'email': u'james.cohan@10gen.com'}

Message: SERVER-12376 Move $skip and $limit before $project in aggregation pipeline
Branch: master
https://github.com/mongodb/mongo/commit/d424a92eb1050023c7f3627a2ff958ff7d37488e

Comment by Charlie Swanson [ 29/May/15 ]

Also, we should clean up the implementations of the other moving optimizations, and possibly look to combine the logic of all three to one place.

Generated at Thu Feb 08 03:28:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.