This Oracle documentation page mentions
… columns of type LONG are created last
but doesn’t say why.
What can the reason be to store them at the end of a row?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A
LONGin Oracle is quite different to alongin C or C++. In Oracle, aLONGis somewhat likeVARCHAR2but with an even bigger maximum length (2GB, I believe?)The reason it’s stored last is because if you had a table that was
(INT a, LONG foo, INT b)and it was stored in that order, then in order to fetch the value of thebcolumn, it would have to read in all the data page that’s taken up by theLONGcolumn. By storing it at the end, it doesn’t have to read in all that data if it doesn’t have to.