I am creating a new database. I have asked this question before, but
not received a definite answer.
Question:
In Creating Tables, is it better to have all fixed-length fields first,
followed by variable length? Or, does it matter?
Some have said it matters, some have said, "It's a myth."
SS 2 1255
"Stanley Sinclair" <st*************@bellsouth.net> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com... I am creating a new database. I have asked this question before, but not received a definite answer.
Question:
In Creating Tables, is it better to have all fixed-length fields first, followed by variable length? Or, does it matter?
Some have said it matters, some have said, "It's a myth."
SS
On DB2 for z/OS it matters. On DB2 for LUW, it will put the varchar columns
at the end for you, regardless of the order you specify (I don't know about
if you add a fixed length column), so it doesn't matter.
The main benefit of putting varchar at the end of the row has to do with the
amount of data logged for updates (not inserts or deletes) to the row, so it
may not be a factor in many applications.
Actually for varchar columns, the fixed piece of a varchar column (length, null, etc.) is
inline in the row physically on disk ... it is only the data portion of the varchar
column that is at the end of the physical row in the data page and a ptr from the fixed
piece tells DB2 how to find the data for that column in that row.
--
Bob
Engagement Specialist - DB2 Information Management Software - IBM Software Group
IBM Toronto Lab
[My comments are solely my own and are not meant to represent an official IBM position -
ask my cat!]
"Mark A" <no****@nowhere.com> wrote in message news:RJ********************@comcast.com... "Stanley Sinclair" <st*************@bellsouth.net> wrote in message news:11**********************@l41g2000cwc.googlegr oups.com...I am creating a new database. I have asked this question before, but not received a definite answer.
Question:
In Creating Tables, is it better to have all fixed-length fields first, followed by variable length? Or, does it matter?
Some have said it matters, some have said, "It's a myth."
SS
On DB2 for z/OS it matters. On DB2 for LUW, it will put the varchar columns at the end for you, regardless of the order you specify (I don't know about if you add a fixed length column), so it doesn't matter.
The main benefit of putting varchar at the end of the row has to do with the amount of data logged for updates (not inserts or deletes) to the row, so it may not be a factor in many applications.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: abcd |
last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual
vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a
ljetvedehg, hard slog," mariyu vede legai pressed...
|
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro...
|
by: Al Christians |
last post by:
I learned Friday night that the hi-fi talk is our most popular tape.
This page:
http://www.belt.demon.co.uk/product/Cable_Controversy/Cable_Controversy.htm
Gives a somewhat different take on...
|
by: Oracle Newbie |
last post by:
I got a new Job where I have to handle Oracle databases on Linux. My
previous experience is with Sql Server on Windows NT. I want to know how
difficult will this shift be and what do I need to...
|
by: Marc Le Roy |
last post by:
Hello,
ADA Ravenscar is a restricted subset of the ADA language that has been
defined for real-time software development in safety critical applications.
Completed with additional restrictions...
|
by: Craig |
last post by:
http://www.devchannel.org/article.pl?sid=04/04/21/2023227
|
by: Immortalist |
last post by:
Various aquisition devices that guide learning along particular
pathways towards human biases. And as E.O. Wilson might say mental
development appears to be genetically constrained.
(1) Language...
|
by: YellowfinTeam |
last post by:
Laws and Myths of Usability & Interface Design
Introduction
Usability and relevance have been identified as the major factors
preventing mass adoption of
Business Intelligence applications....
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |