• Sandy (10/29/2007)


    Hey Gail,

    I apology for that...:D

    I didn't mean that.(he he he..lolz)

    Is fine. I was fairly sure you didn't 😉

    Actually Grant is one of my Fav member in this site.

    Oooh, Grant, you've got a fan... 😀

    I will be here tomoro to discuss more about this topic to make myself clear till I am not sure, I am not going to leave you people...

    Still I am not sure about Table Variable and CTE....wrt to Table Scan or Index Scan......

    Cheers!:P

    Sandy.

    We'll be here.

    As for CTEs and index/table scans. As I said, CTEs aren't tables. They're temporary views. As such, they them selves cannot be the subject of index or table scans. The tables referenced by the CTE are the ones that are read (either by scan or seek)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass