title: Does Django QuerySet use binary search to filter by date?
body: <p>I have a Location object in my Django app that uses Simple History (<a href="https://github.com/treyhunner/django-simple-history" rel="nofollow">https://github.com/treyhunner/django-simple-history</a>), and I need to frequently query that object for its history between two dates. I know you can do that with:</p>
  
  <pre><code>Location.objects.filter(id=1, history_date__range=(starttime, endtime))
  </code></pre>
  
  <p>However, I noticed that all history for a given id is ordered from latest to earliest. That means I should be able to do a binary search on that list to get all dates included. </p>
  
  <p>My question is -- is hard coding a python binary search after</p>
  
  <pre><code>Location.objects.filter(id=1)
  </code></pre>
  
  <p>faster or slower than just using the Query described above?</p>