title: Bulk insert or update record in Sqlite database in Android
body: <p>In my application, i have to insert or updated Bulk of record in SQLite database android,
  record size may 3000 or larger,</p>
  
  <pre><code>    String query="SELECT * FROM tableName where "+id+" = "+bean.id()+" and "+other_id+" = "+bean.otherID();
          Cursor mCount= db.rawQuery(query , null);
              mCount.moveToFirst();
              row=mCount.getCount();
              mCount.close();
              /**
               * Insert here
               */
              if(row==0){
                  ContentValues values = new ContentValues();
                  values.put(key, "value");
                  values.put(key, "value");
                  db.insert("tableName", null, values);
              }
              /**
               * Updated here
               */
              else{
                  ContentValues values = new ContentValues();
                  values.put(key, "value");
                  values.put(key, "value");
                  db.update("tableName", values, "id"+" = ? and "+"other_id"+" = ? ", new String[] {bena.id(),bean.otherid});
              }
  </code></pre>
  
  <p>this code is work fine, but take so much time, how to reduce this time, or bulk insert or update record.</p>