I have an android application that access local sqlite3 db frequently, for performance consideration so i always keep the connection open. But one of my friends recommended
The documentation says the connection can be open as long as you need it. And can be closed in onDestroy() method. Documentation link
Persisting Database Connection:
Since getWritableDatabase() and getReadableDatabase() are expensive to call when the database is closed, you should leave your database connection open for as long as you possibly need to access it. Typically, it is optimal to close the database in the onDestroy() of the calling Activity.
@Override
protected void onDestroy() {
mDbHelper.close();
super.onDestroy();
}