title: how to make SQLite connections more efficient
body: <p>Is there any advantage in keeping a local sqlite connection open the entire time that the activity is running?</p>
  
  <p>I usually create a new connection and then close it within every method that does a database operation. It would look something like this :</p>
  
  <pre><code>myMethod(Context context){
      LocalDBHelper localDBHelper = new LocalDBHelper(context); //extended SQLiteOpenHelper 
      SQLiteDatabase db = localDBHelper.getWritableDatabase();
      ...
      localDBHelper.close();
  }
  </code></pre>
  
  <p>So in a typical user session, this would happen around 10 times. Would it make sense to create a connection in <code>onResume()</code>, use that in all the database access methods and finally close it in <code>onPause()</code>?</p>