home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,024 of 19,505   
   tshad to All   
   Re: Common Table Expression slow   
   05 Dec 10 11:31:51   
   
   0a1b5fbd   
   From: tfs@dslextreme.com   
      
   "--CELKO--"  wrote in message   
   news:0a64e8f2-18cb-4020-8ac8-4408c76ce891@i5g2000yqe.googlegroups.com...   
   >>>  I thought the CTE actually creates temp table internally. <<   
   >   
   > Not in SQL Server. It is an in-line macro and the recursive CTEs are   
   > cursors and procedural code in disguise. DB2 and Oracle optimizers can   
   > make a decision to materialize or not materialize a CTE.   
      
   That may be the case, but in a recursion case I find that the CTE works   
   better (faster) than cursors or recursive rountines.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca