Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 text pointers and table space

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-16 : 09:54:59
Steve writes "I have a table which could grow to around 100 million records, and am obviously trying to save space.

Therefore what I want to know is:-

I have two text fields defined within the table, will SQL Server still allocate space for the 16 byte pointers, even if there is no data for these fields.

i.e. Will I be wasting space if only some of the records have text values? Would I be better off splitting it into a seperate table?"

andre
Constraint Violating Yak Guru

259 Posts

Posted - 2002-01-16 : 10:31:01
I believe there will still be a pointer even if you don't have any data. However, if you don't have any data, no pages for the text field will be allocated. Each page size is several K in size, so you won't be wasting that much space by having empty text fields since no pages will be allocated.

Go to Top of Page

smccreadie
Aged Yak Warrior

505 Posts

Posted - 2002-01-16 : 10:31:33
Text is variable length and able to store up to 2GB. I believe it is stored outside of the normal database with pointers. Best practice is to avoid text and use varchar fields which store up to 8,000 characters. I'd be pretty ware about a 100 million row table which allows text fields. You may want to think about a different way to do this.

Go to Top of Page
   

- Advertisement -