Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7690495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:24:38+00:00 2026-05-31T20:24:38+00:00

Question is old and i guess has no 100% right answer. But would like

  • 0

Question is old and i guess has no 100% right answer. But would like to hear more experienced advice.

Using SQL Server 2008 R2.

I have table where will be stored millions of rows. Most of the columns is description (date, status, title, ..) of varbinary(max) column data. There are also 2 columns of XML data type. these XML’s are small and will be queried often. So:

   MyTable
   (
        SomeID varchar(20)-- queried most often
        Date DateTime -- queried most often
        Status VarChar(10) -- queried most often
        Title VarChar(50) -- queried most often
        -- some more columns here
        SomeSmallXML xml -- queried quite often 
        SomeOtherSmallXML xml -- queried quite often 
        MyData varbinary(max) -- queried rarely
        MyOtherData varbinary(max) -- queried rarely
    )

IF i move all large value types to other table:

  • can do online reindexing of clustered index. But then i have to move also xml types to
    other table. as they are queried quite often, its does not seem
    reasonable. (i expect fragmentation, because SomeID column is coming
    from client app. Its not reasonable to make other surrogate key as
    clustered index, so SomeID will be key of clustered index.)
  • can move large data to slower storage. But guess can achieve
    the same by table partitioning (old data in slow filegroup) + indexes
    on fast storage.

In this case do not see very good reasons to move large value data types to other table.
i do see reason to set “sp_tableoption N’MyTable’, ‘large value types out of row’, ‘ON'”.

What is your advice? What else i have to take in account?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:24:39+00:00Added an answer on May 31, 2026 at 8:24 pm

    I made decision based on discussion with other colleagues: separated SOME of LOB data (also SomeID and Date columns) in separated data in other table.

    Most important: i missed to consider update rate of columns and how long data is queried often and when they get old enough not to be interesting in vast majority (but not all) cases.

    And that is what makes difference in this case.

    So came up with:

      MyTable
       (
            SomeID varchar(20)-- queried most often / Updated never
            Date DateTime -- queried most often / Updated never
            Status VarChar(10) -- queried most often / Updated few times after insert
            Title VarChar(50) -- queried most often / Updated never
            -- some more columns here
            SomeSmallXML xml -- queried quite often /  Updated few times after insert
            SomeOtherSmallXML xml -- queried quite often / Updated never
            MyData varbinary(max) -- queried rarely / Updated never
            MyOtherData varbinary(max) -- queried rarely / Updated 1 shortly after insert
        )
    

    So, as can see, some LOB data- MyData and MyOtherData varbinary(max) gets static after short time. They are large enough, so i would like to store them on cheep disk and put on read only partition at some point of time. As more recent is Date, as more often i need “MyData” or “MyOtherData”.

    So final design looks approximately like this:

     MyTable
       (
            SomeID varchar(20)
            Date DateTime 
            Status VarChar(10) 
            Title VarChar(50) 
            -- some more columns here
            SomeSmallXML xml 
            SomeOtherSmallXML xml 
        )
      MyTableLOB
       (
            SomeID varchar(20) 
            Date DateTime -- used for partitioning
            MyData varbinary(max)
            MyOtherData varbinary(max)
        )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using some old version of drupal. I would like to change meta
Old question My understanding is that C# has in some sense HashSet and set
I'm discarding the old question for a better formulated question. I'm using the twitter
Okay, I might be asking an age old question, but I did not get
NOTE: This question is written in a C# like pseudo code, but I am
... which I didn't feel like splitting into several question posts, since I guess,
Age old question! When you have finished developing and testing your ASP.Net web application,
The age old question. Where should you put your business logic, in the database
This might be a old question: Why does IEnumerable<T> inherit from IEnumerable ? This
I found this question in an old question in your website so i thought

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.