title: Optimising queries in mongodb
body: <p>I am working on optimising my queries in mongodb.</p>
  
  <p>In normal sql query there is an order in which where clauses are applied. For e.g. <code>select * from employees where department="dept1" and floor=2 and sex="male"</code>, here first <code>department="dept1"</code> is applied, then <code>floor=2</code> is applied and lastly <code>sex="male"</code>. </p>
  
  <p>I was wondering does it happen in a similar way in mongodb.
  E.g.
  <code>DbObject search = new BasicDbObject("department", "dept1").put("floor",2).put("sex", "male");</code>
  here which match clause will be  applied first or infact does mongo work in this manner at all.</p>
  
  <p>This question basically arises from my background with SQL databases.</p>
  
  <p>Please help.</p>