title: SQL Does Insert Order of Rows Matter?
body: <p>I am a DB novice exploring Data Warehousing for the first time. I've completed the process of copying over a large volume of data from one of our production systems (MS SQL Server 2012) to our data warehouse (MySQL).</p>
  
  <p>The problem I encountered was that the software/hardware resources I had available for the ETL process were not robust enough to copy over all of the data in my larger tables using a single query (program would run out of memory and crash). To get around this, I broke those tables into 12 chunks by adding a where clause using the modulo operator on the table id, since that was fast and easy to write:</p>
  
  <pre><code>SELECT * FROM table WHERE table.tableID % 12 = 0;
  SELECT * FROM table WHERE table.tableID % 12 = 1;
  SELECT * FROM table WHERE table.tableID % 12 = 2;
  etc.
  </code></pre>
  
  <p>What I'm wondering now is whether this is going to impact my datawarehouse's performance relative to the original database. In the old database, data was inserted roughly chronologically and obviously that won't be the case for the new data warehouse.</p>
  
  <p>I don't know enough about how DB engines actually store data to know if this is a problem. I have all the same indexes on the data warehouse as existed on the original table, but I don't know if DB engines will actually rearrange the data in memory according to the index to make reads faster.</p>
  
  <p>Have I gotten myself into trouble by copying and inserting the data this way?</p>