This editorial was originally published on Feb 11, 2010. It is being re-run as Steve is away at SQL in the City 2014 - London.
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.