This Oracle documentation page mentions
... posts of type Lengthy are produced last
but does not say why.
So what can the main reason be to keep them in the finish of the row?
LONG in Oracle is very dissimilar to a
long in C or C++. In Oracle, a
LONG is sort of like
VARCHAR2 however with a level bigger maximum length (2GB, In my opinion?)
The main reason it's saved last happens because should you have had a table which was
(INT a, LONG foo, INT b) also it was saved for the reason that order, then to be able to fetch the need for the
b column, it would need to read in all of the data page that's adopted through the
LONG column. By storing it in the finish, it does not need to read in most that data whether it does not need to.
It's worth mentioning this is just INTERNAL storage.
In the developer's perspective, the Lengthy could possibly be the third, sixth or first column, or wherever. And you will still add posts to some table having a Lengthy. Nevertheless, you probably should not be developing a table having a Lengthy anymore. They must be CLOBs (or BLOBs as opposed to a Lengthy RAW).
create table test_long (id number, val long, create_date date); desc test_long Name Null? Type ------------------------------ -------- -------------- 1 ID NUMBER 2 VAL LONG 3 CREATE_DATE DATE
My prediction (and unless of course somebody that labored for Oracle talks up, it's speculation) is it happens because LONGs were/are likely to 'not fit' using the row inside a block. A row having a Lengthy would have a very good possibility of requiring to become a lot more than 1 block in dimensions. The Lengthy is that appears to be split (due to its size). By pushing that towards the finish, it is a lot more likely that the rest of the posts would sit together on a single block.
(No expert at Oracle - just needed to lookup exactly what a Lengthy is)
Generally, LONGs (along with other BLOB types) will not be susceptible to search conditions (in JOINs or WHERE clauses). As a result, it seems sensible to change these to the finish, to ensure that another posts (which may be queried together) are situated carefully together. Then, only other posts necessary read although assessing whether this specific row matches the query criteria.