• Gary Varga (10/24/2014)


    I do like some of your ideas Peter but my concern would be the performance overhead. When updating a variably size number that is larger than the currently allocated size? What about inserts that also affect paging? What about considerations such as built in numeric functions - should they "automatically" intelligently (re)size return values?

    Also, some of them remind me of the COM variant type that was just bad news.

    Well i think most of your concerns are less likely then you might think. How a value is stored is from the relational perspective invisible. You decode when you read and encode when you write. In-memory its just like any other bigint, varchar, etc. You are right in pointing out that updating variable types costs performance...when the size changes. Which in my opinion is with integers far less frequent then with say a varchar. So if the storage engine can handle varchar well, it certainly can handle variable length integers well.