473,837 Members | 1,838 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 2112
"alexhguerr a" <al*********@uo l.com.brwrote in message
news:34******** *************** ***********@l6g 2000prm.googleg roups.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:
"alexhguerr a" <alexhgue...@uo l.com.brwrote in message

news:34******** *************** ***********@l6g 2000prm.googleg roups.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:


"alexhguerr a" <alexhgue...@uo l.com.brwrote in message
news:34******** *************** ***********@l6g 2000prm.googleg roups.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...@uo l.com.brwrote:
On 2 jan, 12:14, kschl...@ca.ibm .com wrote:
On Dec 31 2007, 3:15 pm, "Mark A" <nob...@nowhere .comwrote:
"alexhguerr a" <alexhgue...@uo l.com.brwrote in message
>news:34******* *************** ************@l6 g2000prm.google groups.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.ib m.comwrote in message
news:31******** *************** ***********@d4g 2000prg.googleg roups.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.ib m.comwrote in message

news:31******** *************** ***********@d4g 2000prg.googleg roups.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.ib m.comwrote in message
news:31******** *************** ***********@d4g 2000prg.googleg roups.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******** *************** ***********@i29 g2000prf.google groups.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
9193
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 million rows each day averaging around 2GB. The table has 31 partitions (one for each day) as we do not plan on retaining the data beyond 2/3 weeks. The partitions are purged at the end of 2/3rd week depending upon the when it is scheduled to run and...
8
2585
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 Partiton the Tablesapces reside. select substr(TABLESPACE_NAME,1, 18) as TABLESPACE_NAME, case when TABLESPACE_TYPE = 0 then 'DMS' else 'SMS' end as TBS_TYPE,
3
2384
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 different locations than the ones defined on the backup image. While I haven't tried it yet I imagine that I could perform a redirected restore of just the catalog table space and then look at the catalog table info to determine the tablespaces.
6
3811
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. These were created with SMS and reside on the same disk and filesystem (separate directory on filesystem). One is called temp_4k and the other temp_sys. I would assume that the temp_sys was intended for use by the db2 catalog. I know of no way...
0
1485
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 how db2 handles multiple temp tablespaces of the same page size? 2) I had read somewhere that with multiple temp tablespaces of the
10
13430
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 TABLESPACE SNCI001 IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 4096 MANAGED BY SYSTEM USING ('/db2home/db2inst1/dnci1d/user_tblspace')
3
4860
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 restored can be totally different from the machine which was backedup. So we are going with redirect restore.
4
4837
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 = 0 Name = SYSCATSPACE Type = Database managed space Tablespace ID = 1 Name = TEMPSPACE1
6
3327
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 where imported into the exact same table/view/trigger structures (but with slightly different tablespace configuration, see later). The involved hardware was different (one running on x86_64, one running on PPC), but with comparable CPU, memory and...
0
9686
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10634
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10279
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9416
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7819
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5675
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5855
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4053
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3127
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.