CTE or Crate table?

Hi all,
SQL coding question:

What is you opinion on using CTE vs. Create (temp) tables approach when writing complex transformations with lots of steps / or nested selects?

For a long time I am using create table when writing a complex SQL in order to split it to granular pieces. Wondering if CTE will be better option. 
My reason is:

  • in keboola crating temp tables in workspace do not matter much
  • not see any performance issue
  • can debug partial tables faster and more easier
     

Thanks for you ideas/opinions
Ondra
 

2
9 replies