title: SQLite size increase day-by-day even no content in it
body: <p>I have one doubt that is - I am using SQLite database for Some ERP kind of project to android platform. In SQLite database I am only storing last 30 day's of data and rest will be sync to server's database. Now issue that => In my SQLite database any of table doesn't have more than 30 row but still it size increase day-by-day. So to resolve this issue i wrote a service that will be run once in week and this service will do database cleanup for me i am doing these thing</p>
  
  <pre><code>       public class AppServiceDBClean extends WakefulIntentService {   
  int TEN_MINUTES = 10*60*1000;
  public AppServiceDBClean() {
      super("AppService");     
  }       
  
  @Override
  protected void doWakefulWork(Intent intent) {
      // Toast.makeText(getApplicationContext(), "App services", 50000).show();
      System.out.println("service for database clean ");
  
      try {
          doCleanUPDB();
      }
      catch (Exception e) {
          Log.e("AppService", "Exception appending to log file", e);
      }  
  }
  public boolean IsSyncTriggered() {
  
      boolean isActive = false;
      AccountManager am = AccountManager.get(getBaseContext());
      Account[] ac = am.getAccountsByType(Constants.ACCOUNT_TYPE);
      if (ac.length &gt; 0) {
          isActive = ContentResolver.isSyncActive(ac[0], Constants.AUTHORITY);
      }
      return isActive;
  }
  public void doCleanUPDB(){
  
      /**
       * Create some basic instance of database interaction
       */
  
      SQLiteDatabaseWrapper databaseInstance = mycutomclass .getDatabase();
      String sql = "VACUUM;" ;
      if(!IsSyncTriggered()){
          databaseInstance.execSQL(sql);
          databaseInstance.setTransactionSuccessful();
          databaseInstance.endTransaction();
      }else{
          /**
           * If the sync is in progress
           * wait for 10 minutes and try again
           * */
          try {
              Thread.sleep(TEN_MINUTES);
          } catch (InterruptedException e) {
              Log.d("DataCleaningService","SleepException ",e);
              e.printStackTrace();
  
          }
      }
            }
    }
  </code></pre>
  
  <p>Now i want that </p>
  
  <pre><code>   "VACUUM"
  </code></pre>
  
  <p>will release all unused space of all table that means - "It will cleanup my whole database" and after that it will commit this Query. Now question is that - whatever i did here it will work for my requirement or not? This service will do cleanup task for me or not.? Any suggestion is really appreciated . Thanks is advance to all.</p>