As Jörgen Andersson said, cte is faster cause there's no IO on disk, it's just memory. when you declare an #Temporary, you really create the table on your tempdb, that means that you have to write on disk. For a long range of information, you can say that is not that fast as use an cte. If i'm not wrong, declare an variable ( Declare @Table Table (column) ) is faster as use an CTE , and less complicate, cause just create the table on Memory. BUT, you got to remember, that this will only use memory, for a long range of information, this mean that will use a lot of ram.