473,503 Members | 12,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Thoughts about SMS tablespaces

Hello

If im not missing something, when looking into directories that are
SMS containers i can see multiple files, one for table data, one for
indexes and other for lobs.

Is there any special reason for not having different files/containers/
tablespace for each index? if there's a recommendation by IBM to have
one table per tablespace, why not having one file/tablespace for each
index?

Also, why this 'rule' apply only to tables and not to indexes? My
understanding about this is that each index data will mix in extents
and if the table have many big indexes it would be the same as putting
many big tables in one tablespace.

Where im actually working we are having a great effort to move from
SMS to DMS because SMS can't be extended beyond an extent each time
even when using db2empfa. It would help if there would be a feature
like a growing scale for SMS ( like if the table reach 10 MB ,
allocate 10 MB each time, when reaching 100 MB, allocate 100 MB each
time , when reaching 250MB , allocate 250 MB each time). It would
help a lot.......

Anyone knows a tool to help in this migration?

Thanks a lot

Alexandre
Dec 31 '07 #1
8 2100
"alexhguerra" <al*********@uol.com.brwrote in message
news:34**********************************@l6g2000p rm.googlegroups.com...
Hello

If im not missing something, when looking into directories that are
SMS containers i can see multiple files, one for table data, one for
indexes and other for lobs.

Is there any special reason for not having different files/containers/
tablespace for each index? if there's a recommendation by IBM to have
one table per tablespace, why not having one file/tablespace for each
index?

Also, why this 'rule' apply only to tables and not to indexes? My
understanding about this is that each index data will mix in extents
and if the table have many big indexes it would be the same as putting
many big tables in one tablespace.

Where im actually working we are having a great effort to move from
SMS to DMS because SMS can't be extended beyond an extent each time
even when using db2empfa. It would help if there would be a feature
like a growing scale for SMS ( like if the table reach 10 MB ,
allocate 10 MB each time, when reaching 100 MB, allocate 100 MB each
time , when reaching 250MB , allocate 250 MB each time). It would
help a lot.......

Anyone knows a tool to help in this migration?

Thanks a lot

Alexandre
The recommendation to use a separate tablespace for each table only applies
to DB2 for z/OS, and is not applicable to DB2 For Linux. UNIX, and Windows.

It is useful to have a separate tablespace for indexes, mainly because it
gives you the flexibility of using a different bufferpool for indexes and
table data (this would be useful for medium and large tables).
Dec 31 '07 #2
On Dec 31 2007, 3:15 pm, "Mark A" <nob...@nowhere.comwrote:
"alexhguerra" <alexhgue...@uol.com.brwrote in message

news:34**********************************@l6g2000p rm.googlegroups.com...
Hello
If im not missing something, when looking into directories that are
SMS containers i can see multiple files, one for table data, one for
indexes and other for lobs.
Is there any special reason for not having different files/containers/
tablespace for each index? if there's a recommendation by IBM to have
one table per tablespace, why not having one file/tablespace for each
index?
Also, why this 'rule' apply only to tables and not to indexes? My
understanding about this is that each index data will mix in extents
and if the table have many big indexes it would be the same as putting
many big tables in one tablespace.
Where im actually working we are having a great effort to move from
SMS to DMS because SMS can't be extended beyond an extent each time
even when using db2empfa. It would help if there would be a feature
like a growing scale for SMS ( like if the table reach 10 MB ,
allocate 10 MB each time, when reaching 100 MB, allocate 100 MB each
time , when reaching 250MB , allocate 250 MB each time). It would
help a lot.......
Anyone knows a tool to help in this migration?
Thanks a lot
Alexandre

The recommendation to use a separate tablespace for each table only applies
to DB2 for z/OS, and is not applicable to DB2 For Linux. UNIX, and Windows.

It is useful to have a separate tablespace for indexes, mainly because it
gives you the flexibility of using a different bufferpool for indexes and
table data (this would be useful for medium and large tables).
Just as an FYI, there are some people that do prefer to have a single
table per tablespace (or some small number of tables per tablespace)
for recovery purposes. The lowest level of recovery is the tablespace
so by doing this you can get table-level recovery.

Regards,
Kelly
Jan 2 '08 #3
On 2 jan, 12:14, kschl...@ca.ibm.com wrote:
On Dec 31 2007, 3:15 pm, "Mark A" <nob...@nowhere.comwrote:


"alexhguerra" <alexhgue...@uol.com.brwrote in message
news:34**********************************@l6g2000p rm.googlegroups.com...
Hello
If im not missing something, when looking into directories that are
SMS containers i can see multiple files, one for table data, one for
indexes and other for lobs.
Is there any special reason for not having different files/containers/
tablespace for each index? *if there's a recommendation by IBM to have
one table per tablespace, why not having one file/tablespace for each
index?
Also, why this 'rule' apply only to tables and not to indexes? * My
understanding about this is that each index data will mix in extents
and if the table have many big indexes it would be the same as putting
many big tables in one tablespace.
Where im actually working we are having a great effort to move from
SMS to DMS because SMS can't be extended beyond an extent each time
even when using db2empfa. It would help if there would be a feature
like a growing *scale for SMS *( like if the table reach 10 MB ,
allocate 10 MB each time, *when reaching 100 MB, allocate 100 MB each
time , when reaching * *250MB , allocate 250 MB each time). It would
help a lot.......
Anyone knows a tool to help in this migration?
Thanks a lot
Alexandre
The recommendation to use a separate tablespace for each table only applies
to DB2 for z/OS, and is not applicable to DB2 For Linux. UNIX, and Windows.
It is useful to have a separate tablespace for indexes, mainly because it
gives you the flexibility of using a different bufferpool for indexes and
table data (this would be useful for medium and large tables).

Just as an FYI, there are some people that do prefer to have a single
table per tablespace (or some small number of tables per tablespace)
for recovery purposes. *The lowest level of recovery is the tablespace
so by doing this you can get table-level recovery.

Regards,
Kelly- Ocultar texto entre aspas -

- Mostrar texto entre aspas -
Thanks a lot Mark,Kelly

So far, what im still puzzled is that if there´s more than one table
per tablespace, wont be the data of the tables involved mixed in
extents? Making db2 jump between extents on the tablespaces for table
scans isnt a bad idea? Even having tables that grow in different
proportions on the same tablespace would make the jumps in odd
numbers...

Jan 2 '08 #4
On Jan 2, 10:49 am, alexhguerra <alexhgue...@uol.com.brwrote:
On 2 jan, 12:14, kschl...@ca.ibm.com wrote:
On Dec 31 2007, 3:15 pm, "Mark A" <nob...@nowhere.comwrote:
"alexhguerra" <alexhgue...@uol.com.brwrote in message
>news:34**********************************@l6g2000 prm.googlegroups.com....
Hello
If im not missing something, when looking into directories that are
SMS containers i can see multiple files, one for table data, one for
indexes and other for lobs.
Is there any special reason for not having different files/containers/
tablespace for each index? if there's a recommendation by IBM to have
one table per tablespace, why not having one file/tablespace for each
index?
Also, why this 'rule' apply only to tables and not to indexes? My
understanding about this is that each index data will mix in extents
and if the table have many big indexes it would be the same as putting
many big tables in one tablespace.
Where im actually working we are having a great effort to move from
SMS to DMS because SMS can't be extended beyond an extent each time
even when using db2empfa. It would help if there would be a feature
like a growing scale for SMS ( like if the table reach 10 MB ,
allocate 10 MB each time, when reaching 100 MB, allocate 100 MB each
time , when reaching 250MB , allocate 250 MB each time). It would
help a lot.......
Anyone knows a tool to help in this migration?
Thanks a lot
Alexandre
The recommendation to use a separate tablespace for each table only applies
to DB2 for z/OS, and is not applicable to DB2 For Linux. UNIX, and Windows.
It is useful to have a separate tablespace for indexes, mainly becauseit
gives you the flexibility of using a different bufferpool for indexes and
table data (this would be useful for medium and large tables).
Just as an FYI, there are some people that do prefer to have a single
table per tablespace (or some small number of tables per tablespace)
for recovery purposes. The lowest level of recovery is the tablespace
so by doing this you can get table-level recovery.
Regards,
Kelly- Ocultar texto entre aspas -
- Mostrar texto entre aspas -

Thanks a lot Mark,Kelly

So far, what im still puzzled is that if there´s more than one table
per tablespace, wont be the data of the tables involved mixed in
extents? Making db2 jump between extents on the tablespaces for table
scans isnt a bad idea? Even having tables that grow in different
proportions on the same tablespace would make the jumps in odd
numbers...
Yes, that can happen, but if you're talking about table scans then DB2
will generally be prefetching the data ahead of the agent needing it
and the pages will be in the bufferpool by the time that the agent
needs to read them (and multiple prefetchers can be prefetching data
for multiple scans concurrently). Therefore, the fact that the
extents on disk may not be contiguous shouldn't be a problem
generally.

Regards,
Kelly
Jan 2 '08 #5
<ks******@ca.ibm.comwrote in message
news:31**********************************@d4g2000p rg.googlegroups.com...
Just as an FYI, there are some people that do prefer to have a single
table per tablespace (or some small number of tables per tablespace)
for recovery purposes. The lowest level of recovery is the tablespace
so by doing this you can get table-level recovery.

Regards,
Kelly
Some do it, but it is not generally recommended, as is the case on DB2 for
z/OS where it is almost universally recommended to have a separate
tablespace for each table.
Jan 2 '08 #6
On Jan 2, 4:17 pm, "Mark A" <nob...@nowhere.comwrote:
<kschl...@ca.ibm.comwrote in message

news:31**********************************@d4g2000p rg.googlegroups.com...
Just as an FYI, there are some people that do prefer to have a single
table per tablespace (or some small number of tables per tablespace)
for recovery purposes. The lowest level of recovery is the tablespace
so by doing this you can get table-level recovery.
Regards,
Kelly

Some do it, but it is not generally recommended, as is the case on DB2 for
z/OS where it is almost universally recommended to have a separate
tablespace for each table.
I knew a LUW DBA who mandated one tablespace per table. I believe for
recovery reasons. If he had performance in mind while considering such
a design, then there might actually be negative performance gains as
the server would require more IOSERVERS and IOCLEANERS to work
concurrently for all tablespaces. This is my understanding and I might
be wrong.

Couple of questions, that Alex asked, Is there a tool to help you move
from SMS to DMS (may be, none of the free ones).
Can the tablespace grow by a certain amount when full to a certain
extent? Yes, please check the AUTORESIZE and Automatic Storage
features in DB2 v9. That gives you another reason to upgrade, if you
haven't already planned so.

Question to Mark - The z/OS recommendation of having one table per
tablespace is to enhance recoverability or due to performance
considerations?

Happy new year!
~Sanjuro
Jan 3 '08 #7
On Jan 2, 8:29 pm, Sanjuro <ashru...@gmail.comwrote:
On Jan 2, 4:17 pm, "Mark A" <nob...@nowhere.comwrote:
<kschl...@ca.ibm.comwrote in message
news:31**********************************@d4g2000p rg.googlegroups.com...
Just as an FYI, there are some people that do prefer to have a single
table per tablespace (or some small number of tables per tablespace)
for recovery purposes. The lowest level of recovery is the tablespace
so by doing this you can get table-level recovery.
Regards,
Kelly
Some do it, but it is not generally recommended, as is the case on DB2 for
z/OS where it is almost universally recommended to have a separate
tablespace for each table.

I knew a LUW DBA who mandated one tablespace per table. I believe for
recovery reasons. If he had performance in mind while considering such
a design, then there might actually be negative performance gains as
the server would require more IOSERVERS and IOCLEANERS to work
concurrently for all tablespaces. This is my understanding and I might
be wrong.

Couple of questions, that Alex asked, Is there a tool to help you move
from SMS to DMS (may be, none of the free ones).
Can the tablespace grow by a certain amount when full to a certain
extent? Yes, please check the AUTORESIZE and Automatic Storage
features in DB2 v9. That gives you another reason to upgrade, if you
haven't already planned so.

Question to Mark - The z/OS recommendation of having one table per
tablespace is to enhance recoverability or due to performance
considerations?

Happy new year!
~Sanjuro
"I knew a LUW DBA who mandated one tablespace per table."
Yes, I've seen this done fairly frequently. And with the automatic
storage features you mentioned (they were actually first introduced in
V8.2 FP9), it's even easier to manage that type of environment. For
every table that you want to create, you just precede it with a
corresponding create tablespace statement. For example:

create tablespace table1_ts {with an optional initial size and
increase size}
create table table1 (...) in table1_ts

"there might actually be negative performance gains as the server
would require more IOSERVERS and IOCLEANERS to work concurrently for
all tablespaces"
There shouldn't be. Cleaners and prefetchers (i/o servers) can work
on behalf of any tablespace (and are generally configured based on the
number of CPUs or number of underlying disks, rather than the number
of tablespaces). They keep file handles to the various containers
open and perform I/O against them as necessary. What could be an
issue, and it really depends on the number of tablespaces, the number
of containers in each, the setting of maxfilop, workload, etc. is if
there are so many tablespace containers such that the file table fills
and the various EDUs need to constantly close file handles and re-open
containers to access the data (but there are ways of monitoring
whether this is a problem).

Regards,
Kelly
Jan 3 '08 #8
"Sanjuro" <as******@gmail.comwrote in message
news:a1**********************************@i29g2000 prf.googlegroups.com...
I knew a LUW DBA who mandated one tablespace per table. I believe for
recovery reasons. If he had performance in mind while considering such
a design, then there might actually be negative performance gains as
the server would require more IOSERVERS and IOCLEANERS to work
concurrently for all tablespaces. This is my understanding and I might
be wrong.

Couple of questions, that Alex asked, Is there a tool to help you move
from SMS to DMS (may be, none of the free ones).
Can the tablespace grow by a certain amount when full to a certain
extent? Yes, please check the AUTORESIZE and Automatic Storage
features in DB2 v9. That gives you another reason to upgrade, if you
haven't already planned so.

Question to Mark - The z/OS recommendation of having one table per
tablespace is to enhance recoverability or due to performance
considerations?

Happy new year!
~Sanjuro
I am not suggesting that it is never appropriate to have one table per
tablespace in DB2 LUW, but it is not done as often as it is with DB2 for
z/OS. Probably a lot of the DBA's who do it are former DB2 for z/OS DBA's.

There are a number of reasons why it makes more sense to have one table per
tablespace in DB2 for z/OS.

- In a Simple tablespace, there is no such thing as a table scan, only a
tablespace scan (DB2 will read all the pages of all the tables in the
tablespace and then ignore the ones not pertaining to the table in
question). Obviously this is not very efficient. This is not the case with a
segmented tablespace, but there are some disadvantages to segmented
tablespaces, especially with large tables.

- Many of the parameters that can be defined at the table level in LUW, can
only be defined at the tablespace level in z/OS, such as percent free.

- DB2 for z/OS will create separate indexspace for each index, even if you
have multiple tables in a single tablespace.

- Many of the utilities operate at the tablespace level rather than the
table level. For example, the COPY utility, which is used for recovery, but
is also used just to extract the data (like the export utility in LUW). This
also includes the CHECK utility which is used to take a tablespace out of
check pending state, etc. Even runstats is normally run at the tablespace
level, although you can specify a particular table within the tablespace.

I am sure there are other reasons that I have forgotten over the years,
especially since I now work with DB2 LUW almost exclusively.
Jan 3 '08 #9

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

Similar topics

1
9169
by: CK | last post by:
Need a piece of advice on allocation of tablespaces for partitioning We are using a day level range-based approach as our parititiong scheme given that we have data inflows running into 15...
8
2572
by: Joachim Mueller | last post by:
Have written a litte sql for showing the utilization of the tablespace. (found it within the newsgroup from Paul Vernon). Looks fine for an one Partition System only. But how i can I see on which...
3
2360
by: Lew | last post by:
Hi, I was wondering if there is a way to determine the tablespace id of each tablespace on a backup image. I want to perform a redirected restore pointing the tablespace containers to...
6
3780
by: mike_dba | last post by:
Can anyone tell me why a EEE system might be created to have two separate tablespaces with the same 4k pagesize ? They both appear to be in use as I can see the underlying files being modified. ...
0
1462
by: sethwai | last post by:
Hi, A friend of mine inheritted a system that had 2 4k temp tablespaces each assigned to a different bufferpool. This brought up a number of questions for me. 1) Does anyone know in general...
10
13387
by: rAinDeEr | last post by:
Hi, I am trying to create around 70 tablespaces for around 100 tables.. Am using DB2 UDB 8.2 in Linux environment... This is one i generated through Control centre.... CREATE REGULAR...
3
4839
by: dcruncher4 | last post by:
DB2 8.2.3 the task I have is to write a script to restore a database from a backup on to another machine. the backup can be as old as seven years. The container layout on the machine to be...
4
4811
by: beena | last post by:
All, I'm new to the concept of automatic storage... I'm looking at the database setup by a vendor. I see few tablespaces showing up with automatic storage - Yes. Tablespace ID ...
6
3284
by: Troels Arvin | last post by:
Hello, I have recently run a rather large data import where the imported data i pumped through some updatable views equipped with INSTEAD OF triggers. For various reasons, the exact same data...
0
7212
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
7098
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
7296
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
7364
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...
0
7470
tracyyun
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...
0
5604
agi2029
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,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.