title: How slow is a call to a local database?
body: <p>In general, say you have a (&lt;16mb) table in a database running on the same machine as your server. If you need to do lots of querying into this table (%100 reads), is it better to:</p>
  
  <ol>
  <li>Get the entire table, and do all the searching/querying/ in the server code.</li>
  <li>Make lots of queries into the local database.</li>
  </ol>
  
  <p>If the database is local, can I take advantage of the dbms's highly-efficient internal data structures for querying, or is the delay such that it's faster to map the tables returned by the database into my own data structures.</p>
  
  <p>Thanks.</p>