I have an Oracle database table where I need to store byte array in one of the columns. The size distribution of these byte arrays is as follows:
- 80% are under 1000 bytes
- 15% are between 1000 and 2000 bytes
- 5% are over 2000 bytes
One approach I considered is using two nullable columns, instead of one:
- A RAW(2000) column for storing the 95% of byte arrays that are under
2000 bytes - A BLOB column for storing byte arrays larger than 2000 bytes
Is this a good strategy for storing byte arrays in this way, or would it be better to use a single BLOB column? What are the pros and cons of each approach, particularly in terms of performance, storage efficiency, and complexity?