I have used to [following](http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#beginTransaction%28%29) idiom on the `doInBackground` method of an AsyncTask for quick inserts into the DB:

```
    mDatabase.beginTransaction();
    try {
            //... do DB stuff

            mDatabase.setTransactionSuccessful();
    } finally {
            mDatabase.endTransaction();
    }

```

However, if I use this idiom, my progress dialog (placed in the `onPreExecute` method) is not displayed. On the other hand, if I replace the above code with regular mDatabase.execSQL() statements, the progress dialog does get displayed but inserts become very slow. Is there any way I can have the best of both worlds (i.e., progress dialog and fast insertions). Thanks!

Note: beginTransaction run in EXCLUSIVE mode (I don't get what that means tbh). Is this the cause?