
The definition of a “main attack” in military terms is exactly as you would expect: “The part of an attack where the commander concentrates the greatest portion of offensive power.” There are actually two principles hidden within that single statement. The first — “the part of the attack” — is about identifying the right opportunity. The second — “greatest portion of offensive power” — is about fully committing to the chosen action with your full resources. Executing the main attack means both selecting the right target and then putting everything you can possibly muster into the resulting fight.
There are some solutions to this this problem for the client-side world such as webpack’s “tree shaking” which bundles only the code your application actually uses to be sent to the client, but even these solutions aren’t optimized for the server-side world.
If you really think it’s necessary to query and retrieve all 2000 sales employees at once, another option is to break those records up into the documents that contain only the data you’ll need in the initial query, and then put any extra details into a separate collection or subcollection. Those other documents won’t get transferred on that first fetch, but you can request them later as your user needs them.