Data Pages and varbinary(max) Clustered Index Scan

  • Take the following table as an example:

    Table1

    Column1 int

    Column2 int

    Column3 varbinary(max)

    My understanding is that all the row data will be stored in the 8k data page unless the row won't fit including the varbinary(max) unless it is too large in which case the Varbinary(max) Column3 will have a pointer in the row to the LOB data pages right? Now, assume that you have a Clustered index scan occur on Table1, SQL Server will scan in all the data pages including the varbinary(max) data if it fit in the row. Now my question is will this scan cause the data that didn't fit into the row to be scaned as well or will just the pointers to that data?

    Thanks!

  • I think that depends on whether or not the query requested the varbinary(max) column or not.

    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

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply