title: SQL queries versus search algorithms
body: <p>I am kind of new in Android and SQL (not completely newbie, but not pro), so sorry if my question sounds bosh.</p>
  
  <p>I am creating an Android application. For saving the users data I created a database using SQLite.</p>
  
  <p>My problem is that I can't decide which method is faster:</p>
  
  <ul>
  <li>get the data with SQLite queries,
  or </li>
  <li>get all the data into a List (with an SQLite query) and then search in the list with searching algorithms.</li>
  </ul>
  
  <p>For example: I have a database of Persons (around 1500-2000 records). In one page I want to show all the names, in an other I would like to show only the names who are married, in an other page I want to show the last 30 Persons who has been added recently etc...</p>
  
  <p>Which method would be faster? Do the queries all the time for displaying the data, or get all the data, and than search for the relevant information while displaying?</p>