title: Join 2 tables and use where in same query
body: <p>I need to join 2 tables (1.5KK and 500K records) but only on some records of the first table. I try this</p>
  
  <pre><code>SELECT Table1.col1 AS NCol1, Table1.col2 AS NCol2, Table2.col1 AS NCol3
  FROM Table1 LEFT JOIN Table2 ON Table1.col3 = Table2.col3
  WHERE Table1.col1 = value
  </code></pre>
  
  <p>but SQLite get stuck. I use DB browser for SQLite and i cant get response.</p>
  
  <p>Works greate if i do</p>
  
  <pre><code>CREATE TEMP TABLE TEMP_JOIN AS
  SELECT Table1.col1 AS NCol1, Table1.col2 AS NCol2, Table2.col1 AS NCol3
  FROM Table1 LEFT JOIN Table2 ON Table1.col3 = Table2.col3;
  
  SELECT * FROM TEMP_JOIN WHERE NCol1 = value
  </code></pre>
  
  <p>I want to use the first code, what fix i need to do to make that work?</p>