title: Oak RDB Document Node Strore Write is slow
body: <p>Apache jackrabbit oak RDB Document node store has been used
  and RDB type is Postgres.</p>
  <p>Environment Details</p>
  <p>Apache jackrabbit oak 1.42.0
  Java 11</p>
  <p>Issue : Loading is extremely slow (10x) when compared with Segment node store(tar) .
  We have huge number of documents(800 GB) to migrate and have to use RDB Document node store only.</p>
  <p>Repo initialization code snippet for reference</p>
  <pre><code>RDBDocumentNodeStoreBuilder rdbDocumentNodeStoreBuilder = RDBDocumentNodeStoreBuilder
                  .newRDBDocumentNodeStoreBuilder().setRDBConnection(dataSource);
  rdbDocumentNodeStoreBuilder.setBlobStore(createBlobStore());
      DocumentNodeStore store = rdbDocumentNodeStoreBuilder.build();
          Repository repository = new Jcr(new Oak(store).with(createSecurityProvider()).withAtomicCounter())
                  .createRepository();
  </code></pre>
  <p>In thread dumps and most of the  threads are got stuck at socket.read or socket write .</p>
  <p>Postgres is also running on the same VM where migration  process is running .
  For single document checkin around 90 rows getting inserted in NODES table .
  How do we improve the loading speed any recommendations ?</p>