Question: There are a number of post in relation to Visual Studio building projects when not necessary. However, none seem to cover this particular issue.

I'm running Visual Studio 2012 Professional Update 4.

In my solution, I have a unit test project that has a project reference to a BizTalk Transforms project. This in-turn has a project reference to a BizTalk schemas project.

Every time I choose to run a unit test, the whole solution is built, even though no changes have been made.

The first line displayed in the build window is as follows:

> 
> Input file
>  'C:\Workspaces\rbowman\Branches\Current-branchRB\WareHouse\FFF.Enterprise.WareHouse.Schemas\FFF.Enterprise.WareHouse.Schemas.btproj.user'
>  is modified after output file
>  'C:\Workspaces\rbowman\Branches\Current-branchRB\WareHouse\FFF.Enterprise.WareHouse.Schemas\bin\Release\FFF.Enterprise.WareHouse.Schemas.pdb'.
> 
> 
> 

Note: it seems to be the **.user** file that's causing the rebuild.
Does anyone know how to prevent this? Strange but I only seem to be getting the problem with BizTalk proj files. I am seeing this behavior across multiple solutions but the problem file is always identified as a btproj.user.

This screencast illustrates the problem: [screencast link](http://biztalkers.com/video/build-before-test.mp4)

Answer: 
The order of the fields in a compound index is very important. It's hard to diagnose without having access to the real data and usage patterns, but this key might increase the odds of matching (or not) the document using only the index:

```
{
  "loc" : "2dsphere",
  "name" : 1,
  "categoriesIds" : 1
}

```
Not sure if it is exactly the same issue but we had a similar problem with a **multikey index** with poor performance when no results were found.

It is actually a Mongo bug that was fixed in v3.3.8. 
<https://jira.mongodb.org/browse/SERVER-15086>

We fixed our problems after upgrading Mongo and rebuilding the index.