We 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.
The Voice of the DBA Podcasts
The podcast feeds are available at sqlservercentral.mevio.com. 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 www.everydayjones.com.