title: SQLite table aliases effecting the performance of queries
body: <p>How does SQLite internally treats the alias?</p>
  
  <p>Does creating a table name alias internally creates a copy of the same table or does it just refers to the same table without creating a copy? </p>
  
  <p>When I create multiple aliases of the same table in my code, performance of the query is severely hit!</p>
  
  <p>In my case, I have one table, call it MainTable with namely 2 columns, name and value. 
  I want to select multiple values in one row as different columns. for example</p>
  
  <p>Name: a,b,c,d,e,f<br>
  Value: p,q,r,s,t,u<br>
  such that a corresponds to p and so on. </p>
  
  <p>I want to select values for names a,b,c and d in one row => p,q,r,s
  So I write a query </p>
  
  <pre><code>SELECT t1.name, t2.name, t3.name, t4.name  
  FROM MainTable t1, MainTable t2, MainTable t3, MainTable t4
  WHERE t1.name = 'a' and t2.name = 'b' and t3.name = 'c' and t4.name = 'd';
  </code></pre>
  
  <p>This way f writing the query kills the performance when size of the table increases as rightly pointed above by Larry.</p>
  
  <p>Is there any efficient way to retrieve this result. I am bad at SQL queries :(    </p>