title: slow sql query execution
body: <p>I have following rather simple query</p>
  
  <pre><code>select count(*) from tbl t1, tbl t2
  </code></pre>
  
  <p>For some reason it takes tens of seconds to execute this command. I wonder why it happens? It seems that it builds Cartesian product of that tables (table has about 270k rows), but amount of rows is obvious without building product.</p>
  
  <p>Some clarifications would be helpful.</p>