title: How make JOIN table in ClickHouse DB faster?
body: <p>I have two tables</p>
  
  <p>event</p>
  
  <ul>
  <li>id</li>
  <li>os</li>
  </ul>
  
  <p>params</p>
  
  <ul>
  <li>id</li>
  <li>sx</li>
  <li>sy</li>
  </ul>
  
  <p>This table have relation 1-1 by id. If execute query</p>
  
  <pre><code>select count(*)
  from
  (select id from event where os like 'Android%')
  inner join
  (select id from params where sx &gt;= 1024)
  using id
  </code></pre>
  
  <p>they very slow</p>
  
  <p>But if all data contains in one table</p>
  
  <pre><code>select count(*) from event where sx &gt;= 1024 and os like 'Android%'
  </code></pre>
  
  <p>Query executed very fast.</p>
  
  <p>Please, tell me how use join in ClickHouse DB effective? Keep all data in one table is not convenient.</p>