title: Mongodb javascript expressions and $where
body: <p>Are there any performance impacts using javascript expressions inside mongodb query instead standard BSON notation. For example:</p>
  
  <pre><code>&gt;db.myCollection.find( { a : { $gt: 3 } } );
  &gt;db.myCollection.find( { $where: "this.a &gt; 3" } );
  </code></pre>
  
  <p>Will the first query be faster than the second one if there is no index on a column? Also, is there any way to write query</p>
  
  <pre><code>&gt;db.myCollection.find( { $where: "this.a / 10 &gt; 3" } );
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&gt;db.myCollection.find( { $where: "this.a / this.b &gt; 3" } );
  </code></pre>
  
  <p>without using $where notation?</p>