• SQLSACT (9/13/2012)


    GilaMonster (9/13/2012)


    SQLSACT (9/13/2012)


    When SQL Server brings pages into Memory, the pages sit in memory in the same way as they were sitting on disk?

    Meaning?

    When the query is submitted for the second time, even though the pages are in memory, are there still reads happening on the disk? Because of the Clustered Index Seek?

    Is this right?

    Only if some pages are needed that aren't in memory

    Meaning?

    In the same order as they were on disk

    No.

    Only if some pages are needed that aren't in memory

    Ok this makes sense

    What I'm struggling to grasp is why does SQL Server still worry with the Index if all the pages that it needs is already in memory.

    Thanks

    How else will it find what page a row is on? Indexes are about locating rows. If it didn't bother with an index, it'd have to do a full table scan to find rows needed for the query. Not exactly efficient.

    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