Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

When is 8000 too small?

By Steve Jones, recently had a question on SQL ServerCentral about the HASHBYTES function. Once again it was a question that generated some discussion, but out of it came one very interesting comment. Hufgo Kornelis had this to say about the 8000 byte limitation

"I consider this a strange obsolete limitation"

I know we have a varchar(max) datatype in SQL Server 2005/2008, but it seems that the 8000 byte limitation, set by page sizes, still crops up in so much code. With data sizes growing and constant growth in hardware, especially as we have started moving en masse to 64 bit platforms, should we consider a larger page size?

I'm not sure since there are lots of data that easily fit on one page, and the ability to have LOB data on the page, or on separate pages, works well to provide great I/O access for most systems. However should we start to code and allow all our T-SQL functions to work with more than 8000 bytes? Do they really need to work with page-sized data or should we allow functions such as HASHBYTES, SUBSTRING, and all string functions, work with the full range of data storage in SQL Server?

There are fundamental technical limitations in some functions, whereby algorithms just don't work beyond a certain data size. That could be overcome with new algorithms, or separate functions designed to work with any size data. In the places where it isn't a technical limitation, I think we ought to consistently have all our functions working with any size data, and preventing these arbitrary limits from being placed on our code.

Steve Jones


The Voice of the DBA Podcasts

Everyday Jones

The podcast feeds are available at Comments are definitely appreciated and wanted, and you can get feeds from there.

You can also follow Steve Jones on Twitter:

Overall RSS Feed: or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at

Total article views: 210 | Views in the last 30 days: 1
Related Articles

character limitations on sp name, & function name

character limitations on sp name, & function name


Podcast Upgrades

A minor change for the podcasts next week. I got my wireless microphone, and I'm working with it a b...



I'm working on getting a small studio set up for some podcasting of the editorials. That means I put...


Podcast Announcements

Podcast Feeds


Technical Podcasts I Listen To

There are a few podcasts I tend to listen to as I have time. Since I work with a wide...


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones