title: Truncate and Insert in ClickHouse Database
body: <p>I have a particular scenario where I need to truncate and batch insert into a Table in ClickHouse DBMS for every 30 minutes or so. I could find no reference of <strong>truncate</strong> option in ClickHouse.</p>
  
  <p>However, I could find suggestions that we can indirectly achieve this by <strong>dropping</strong> the old table, <strong>creating</strong> a new table with same name and <strong>inserting</strong> data into it.</p>
  
  <p>With respect to that, I have a few questions. </p>
  
  <ol>
  <li>How is this achieved ? What is the sequence of steps in this process ?</li>
  <li>What happens to other queries such as <strong>Select</strong> during the time when the table is being dropped and recreated ?</li>
  <li>How long does it usually take for a table to be dropped and recreated in ClickHouse ?</li>
  <li>Is there a better and clean way this can be achieved ?</li>
  </ol>