title: Why is Solr so much faster than Postgres?
body: <p>I recently switched from Postgres to Solr and saw a ~50x speed up in our queries. The queries we run involve multiple ranges, and our data is vehicle listings. For example: "Find all vehicles with mileage &lt; 50,000, $5,000 &lt; price &lt; $10,000, make=Mazda..."</p>
  
  <p>I created indices on all the relevant columns in Postgres, so it should be a pretty fair comparison. Looking at the query plan in Postgres though it was still just using a single index and then scanning (I assume because it couldn't make use of all the different indices).</p>
  
  <p>As I understand it, Postgres and Solr use vaguely similar data structures (B-trees), and they both cache data in-memory. So I'm wondering where such a large performance difference comes from.</p>
  
  <p>What differences in architecture would explain this?</p>