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
 Old Forums
 CLOSED - SQL Server 2005/Yukon
 TEXT v. VARCHAR(MAX)

Author  Topic 

Kristen
Test

22859 Posts

Posted - 2006-05-30 : 08:09:21
Are there any circumstances where you would want to use TEXT instead of VARCHAR(MAX) (or NTEXT instead of NVARCHAR(MAX) )?

Thanks

Kristen

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-05-30 : 08:22:10
very very very large text??

max indicates that the maximum storage size is 2^31-1 bytes

varchar can now be spread over multiple pages so there's no practical "limit" to it.
that can probably cause split pages. i guess paul randall would be the best person to answer that one...

Go with the flow & have fun! Else fight the flow
Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"]
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2006-05-30 : 08:23:39
I can't think of one. Looking the other way though the BOL entry suggests that we won't be seeing TEXT in future versions (whenever that might be...)

-------
Moo. :)
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-05-30 : 08:35:00
"very very very large text??"

No, I as thinking Real World Stuff. Like a CMS system that needs a bit more than 8,000 characters, but not massively more ...

In fact all our TEXT columns are where "8,000 characters isn't quite enough to be sure the Right Stuff will fit"

I am also imagining that any seriously large data would be stored in IMAGE, rather than TEXT ...

"that can probably cause split pages"

Probably preferable to messing around with fake-string-handling on TEXT columns!

"the BOL entry suggests that we won't be seeing TEXT in future versions"

Makes sense. Actually, doesn't make sense! I wonder why MS didn't just change TEXT to do the equivalent job of VARCHAR(MAX)?

Kristen
Go to Top of Page
   

- Advertisement -