title: What is the limit of SQL variables one can specify in a single execSQL query
body: <p>I am trying to improve the speed of my android database inserts. What I am currently doing is generate a string like:</p>
  
  <pre><code>SELECT ? as title, ? as musician_id, ? as album_id, ? as genre
  UNION SELECT ?, ?, ?, ?
  UNION SELECT ?, ?, ?, ?
  UNION SELECT ?, ?, ?, ?
  UNION SELECT ?, ?, ?, ?
  UNION SELECT ?, ?, ?, ?
  </code></pre>
  
  <p>And then executing it with</p>
  
  <pre><code>SQLiteDatabase database = //initialized in some way
  String insertQuery; // the string of the query above
  String [] parameters; // the parameters to use in the insertion.
  database.execSQL(insertQuery.toString(), parameters);
  </code></pre>
  
  <p>I am getting the following error when I try to insert about 2000 rows:</p>
  
  <pre><code>Caused by: android.database.sqlite.SQLiteException: too many SQL variables (code 1): , while compiling: INSERT INTO songs (title, musician_id, album_id, genre)
  SELECT ? as title, ? as musician_id, ? as album_id, ? as genre
  UNION SELECT ?, ?, ?, ?
  UNION SELECT ?, ?, ?, ?
  </code></pre>
  
  <p>When I try to insert about 200 rows everything works fine.</p>
  
  <p>I suppose it is obvious - I am trying to pass in too many variables in a single <code>execSQL</code>. Does anyone know what is the limit so that I can split the rows I insert in appropriate batches?</p>