473,385 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How many extents are allocated when a table is created

Hi group,
I am going through some exercises regarding DB2 Administration and I
found the below:
How many extents are allocated when the following Employee table is
created in the DMS tablespace TBS03?

create table employee
( ID smallint not null,
name varchar(9),
DEPT smallint check (dept between 10 and 100),
job char(5) check (job in ('Sales', 'Mgr', 'Clerk')),
hiredate date,
salary decimal(7,2),
Comm decimal (7,2),
Notes long varchar,
resume blob,
constraint yearsal check (year(hiredate) 1986 or salary 40500)
) in TBS03;
create unique index inx_u_emp on employee (id);
create index inx_emp_01 on employee (name);

The answer is 10 but I did not understand how can somebody calculcate
this?
Is it one extend for each column of the table?
Many thanks in advance
Demetris

Sep 11 '07 #1
1 4094
Hi
I found the following url which describes the different types of
extents that can be created:
http://publib.boulder.ibm.com/infoce...n/c0004935.htm

Briefly:
1. A data object. This is where the regular column data is stored.
2. An index object. This is where all indexes defined on the table are
stored.
3. A long field object. This is where long field data, if your table
has one or more LONG columns, is stored.
4. Two LOB objects. If your table has one or more LOB columns, they
are stored in these two table objects:
o One table object for the LOB data
o A second table object for metadata describing the LOB
data.
6. A block map object for multidimensional tables.
7. Each table object is stored separately, and each object allocates
new extents as needed.
8. Each DMS table object is also paired with a metadata object called
an extent map, which describes all of the extents in the table space
that belong to the table object.
9-10. Two more extents are needed for the 2 indexes (ndex inx_u_emp,
inx_emp_01)

Please advice if the above syllogism is correct.
Thanks

Sep 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jeff Williams | last post by:
Ok, everyone loves to talk about dynamic arrays and ptr's etc, they provide endless conversation :) so here goes: Will this leak memory (my intuition says yes): void foo(vector<int*>& vec) {...
1
by: Lod | last post by:
I have a question concerning the extents from a database. The database stops occasionaly with an ORA-01632 error. Increasing the max_extent from the individual index, named in the error is keeping...
1
by: Doron | last post by:
is there a setting that will ebnable uniform extent allocation upon creation of index/table by default ? if there isn't any default setting can you code it in? thanks, Doron
2
by: Markus Neifer | last post by:
Hi, could somebody please explain why the following statement consumes six extents: CREATE TABLE T1 (C1 INT, C2 BLOB(1K)) IN TS1 I see one extent for the extent map and one extend for data...
22
by: Bradley | last post by:
Has anyone else noticed this problem? I converted the back-end to A2000 and the performance problem was fixed. We supply a 97 and 2000 version of our software so we kept the backend in A97 to make...
4
by: Thomas Paul Diffenbach | last post by:
Can anyone point me to an open source library of /statically allocated/ data structures? I'm writing some code that would benefit from trees, preferably self balancing, but on an embedded system...
148
by: onkar | last post by:
Given the following code & variable i . int main(int argc,char **argv){ int i; printf("%d\n",i); return 0; } here i is allocated from bss or stack ?
15
by: A. Farber | last post by:
Hello, I'm programming a web game on OpenBSD, but am also trying to keep in runnable on Linux and Cygwin. I have a list of tables at which a player/kibitzer can sit down or create a new empty...
7
by: Jo | last post by:
Hi, How can i differentiate between static and dynamic allocated objects? For example: void SomeFunction1() { CObject *objectp = new CObject; CObject object;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
1
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...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.