title: sqlite: merging two tables on a common key
body: <p>A simple sqlite query is running impossibly slowly and I'm not sure why. I have two tables A and B, they have the same primary keys and different columns. I want to create table C that has the primary key plus all of the columns in A and all of the columns in B. I'm running this via a python connection cursor cs.</p>
  
  <pre><code>   cs.execute('create table tableC as select a.*, b.*
     from tableA a left join tableB b
     on a.rid = b.id')
  </code></pre>
  
  <p>left join is ok since the two tables have equal number of rows.
  instead of writing out all of the column names in one of the tables, I allowed the id column to be duplicated.</p>
  
  <p>each table has 50,000 rows and about 200 columns. </p>
  
  <p>is there a better way to do this?</p>