470,815 Members | 1,313 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

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 1991
"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by CK | last post: by
8 posts views Thread by Joachim Mueller | last post: by
reply views Thread by sethwai | last post: by
10 posts views Thread by rAinDeEr | last post: by
3 posts views Thread by dcruncher4 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.