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,

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.

Total article views: 357 | Views in the last 30 days: 9
 
Related Articles
FORUM

character limitations on sp name, & function name

character limitations on sp name, & function name

FORUM

SQL 2005 Table Valued Functions

Limitations

FORUM

"function"

"function"

FORUM

Error : Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)" in SQL 2005

Error : Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)" in S...

FORUM

Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

Tags
editorial    
 
Contribute

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
Editor, SQLServerCentral.com

Already a member? Jump in:

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