fragglerock
Programmer
I have been asked to comment on a table structure that a contractor wants to use the structure is as follows
Columns must be listed in the following order:
Primary Keys
NUMBER, not null (shortest to longest)
DATE, not null
VARCHAR, not null (shortest to longest)
NUMBER, nullable (shortest to longest)
DATE, nullable
VARCHAR, nullable (shortest to longest)
This ordering will minimise row chaining, where rows are split across multiple disk blocks. When this occurs, queries take more time to execute because multiple disk blocks need to be read instead of just one.
This sounds like rubbish to me, or if it is true the performance difference for general tables is going to be minuscule, and the order would best reflect internal table structure (ie all bits of an address next to each other, "house keeping" (dateCreated etc) at the end). I always understood that order does not matter, and making things easy for the human reader is sensible.
Comments?
Columns must be listed in the following order:
Primary Keys
NUMBER, not null (shortest to longest)
DATE, not null
VARCHAR, not null (shortest to longest)
NUMBER, nullable (shortest to longest)
DATE, nullable
VARCHAR, nullable (shortest to longest)
This ordering will minimise row chaining, where rows are split across multiple disk blocks. When this occurs, queries take more time to execute because multiple disk blocks need to be read instead of just one.
This sounds like rubbish to me, or if it is true the performance difference for general tables is going to be minuscule, and the order would best reflect internal table structure (ie all bits of an address next to each other, "house keeping" (dateCreated etc) at the end). I always understood that order does not matter, and making things easy for the human reader is sensible.
Comments?