title: Saving a large graph with Entity Framework 5
body: <p>I know that it is not recommended to use Entity Framework for bulk inserting since it adds them one by one. (<a href="https://stackoverflow.com/questions/15766260/insertion-large-number-of-entities-into-sql-server-2012">Example 1</a>, <a href="https://stackoverflow.com/questions/6107206/improving-bulk-insert-performance-in-entity-framework">example 2</a>.)</p>
  
  <p>How about attaching one object that has a large graph underneath it, e.g. 100Ks of objects? - Specifically:</p>
  
  <ul>
  <li>What are the (time/memory) performance considerations for using EF5 to do this?</li>
  <li>Are there any best practices for storing large graphs?</li>
  <li>Are relational databases even a good idea for storing large graphs?</li>
  </ul>
  
  <p>A bit of background:</p>
  
  <ul>
  <li><p>The graph is created using EF5 POCOs, then attached at the root and saved. The graph is always new data, never updates. The DB we use is SQL Server 2012.</p></li>
  <li><p>The actual creation process can take tens of seconds for large cases (100Ks of objects), so if the attach/save process takes 10% of that time, it won't have a significant affect on the overall time performance.</p></li>
  </ul>