title: Should we do a bulk insertion operation in mongodb ?? will this block other Read / Write Operations?
body: <p>I am using mongodb for our Application .</p>
  
  <p>We have a very high usage of mongodb usage , you will know seeing this mongostat output </p>
  
  <pre><code>insert/s query/s update/s delete/s getmore/s command/s flushes/s mapped  vsize    res faults/s locked % idx miss %    q t|r|w  conn       time
         0       4        1        0         0         3         1  10396  11347    591        0      0.1          0      0|0|0    70   10:57:28
         0      65       31        0         0        35         0  10396  11347    591        1      3.7          0      0|0|0    70   10:57:29
         0      76       37        0         0        41         0  10396  11347    591        0      3.5          0      0|0|0    70   10:57:30
         0      85       42        0         0        44         0  10396  11347    591        1      4.7          0      0|0|0    70   10:57:33
         0      52       25        0         0        29         0  10396  11347    591        0      2.9          0      0|0|0    70   10:57:34
         0      26       11        0         0        15         0  10396  11347    591        0      1.1          0      0|0|0    70   10:57:36
         0      83       41        0         0        43         0  10396  11347    591        1      4.6          0      0|0|0    69   10:57:37
  </code></pre>
  
  <p>Regarding my query , </p>
  
  <p>As per our Application whenver a user logins into the Application , i need to store whatever the symbols the  user holds .
  (A user might contain symbols within a  range from 20 to 100 ) </p>
  
  <p><strong>What is the best way to achieve the above insertion operation</strong> </p>
  
  <pre><code>1. Perform a insert operation for each symbol individually 
  
  Or 
  
  2. Insert all the symbols at once this way 
  
  
  
  public void insert(ArrayList&lt;QuoteReportBean&gt; quotelist) {
              DBObject[] totalrecords = new BasicDBObject[quotelist.size()];
              for (int i = 0; i &lt; quotelist.size(); i++) {
                  QuoteReportBean reportbean = quotelist.get(i);
                  BasicDBObject dbrecord = new BasicDBObject();
                  dbrecord.append("cust", reportbean.getCustomerId());
                  dbrecord.append("symbol", reportbean.getUniqueSymbol());
                  dbrecord.append("access_time", reportbean.getDate());
                  totalrecords[i] = dbrecord;
              }
           WriteResult result = coll.insert(totalrecords,WriteConcern.NORMAL);
           logger.info("quotelist" + result.toString());
      }
  </code></pre>
  
  <p>My concern is that as i  set the profiling level to 50 </p>
  
  <pre><code> db.setProfilingLevel(1,50)
  </code></pre>
  
  <p>and the insertion query with the second approach has been recorded in the system.profile collection </p>
  
  <p><strong>Could you please tell me if the insert operation might lock other read / write operations ??</strong></p>