Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003

    Question Unanswered: Ntext & text storage - how do these work?


    Can some one please explain how the storage of a huge text or ntext object ( say a string of characters 100 KB in size ) is carried out please?

    With a data page maximum size of 8000 bytes, how does SQL handle the storage of such an string - it would obviously obverlap multiple rows etc.
    Does the application writing it to the database have to split the object over multiple rows and manually keep track of which bit is in which row so it can be re-created later in correct sequence by adding the bits back together, or is it done some how differently?

    Any help most welcome as this is a bit confusing.


    Last edited by sqlguy7777; 11-28-04 at 18:21.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    In SQL 7.0 and later, it happens pretty much like writing a text file. The client spews a bunch of data toward the server, which stores it to disk... At some later point in time, a client requests the data which the server sends back. No moving pieces of significance.


  3. #3
    Join Date
    Nov 2002
    It only save a 16 byte pointer to the actual physical location on the disk.

    And like Pat said, it just write it out, BUT it has to be written in chunks

    Look up READTEXT, WRITETEXT in Books Online....

    It's're better off storing the path and filename on the row and save the file to disk your self.

    And that's the one thing they did not enhace for 2,005...but I betcha it was on the drawing board...

    They will have varchar(MAX)...which will be able to be stored across many (They don't say the limit) pages...

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts