473,503 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can You Put Tables in USERSPACE1 With Indexes In INDEXSPACE1 ?

Hi,

I thought we would be able to have indexes in a
separate tablespace from the tables in another
tablespace. So I went and created a INDEXSPACE1,
only to not see the syntax on how to create index
.... in "INDEXSPACE1" . We have 6 nodes on 3
physical servers ( 2 nodes per server ), each
server is a 4-CPU machine.

I cannot find DB2 documentation to support this idea,
is this possible in DB2? ( Separate the indexes from
the tables ).

We're running 8.1 with Fixpack 5 on SLES 8 Linux.

Thanks in advance!


Nov 12 '05 #1
11 3425
"Data Goob" <da******@hotmail.com> wrote in message
news:vy*******************@fe06.usenetserver.com.. .
Hi,

I thought we would be able to have indexes in a
separate tablespace from the tables in another
tablespace. So I went and created a INDEXSPACE1,
only to not see the syntax on how to create index
... in "INDEXSPACE1" . We have 6 nodes on 3
physical servers ( 2 nodes per server ), each
server is a 4-CPU machine.

I cannot find DB2 documentation to support this idea,
is this possible in DB2? ( Separate the indexes from
the tables ).

We're running 8.1 with Fixpack 5 on SLES 8 Linux.

Thanks in advance!

First create the tablespace for the index(s) you want. Then when you create
the table, specify the tablespace for the data, and the tablespace to be
used for any indexes on that table. Obviously if the table is already
created, you will have to drop and recreate it (I don't think you can alter
this table attribute).
Nov 12 '05 #2
Thanks Mark.

It's a bit un-intuitive and backward to do it this
way, but I guess that's the way it works.
"Mark A" <ma@switchboard.net> wrote in message news:Se****************@news.uswest.net...
"Data Goob" <da******@hotmail.com> wrote in message
news:vy*******************@fe06.usenetserver.com.. .
Hi,

I thought we would be able to have indexes in a
separate tablespace from the tables in another
tablespace. So I went and created a INDEXSPACE1,
only to not see the syntax on how to create index
... in "INDEXSPACE1" . We have 6 nodes on 3
physical servers ( 2 nodes per server ), each
server is a 4-CPU machine.

I cannot find DB2 documentation to support this idea,
is this possible in DB2? ( Separate the indexes from
the tables ).

We're running 8.1 with Fixpack 5 on SLES 8 Linux.

Thanks in advance!

First create the tablespace for the index(s) you want. Then when you create
the table, specify the tablespace for the data, and the tablespace to be
used for any indexes on that table. Obviously if the table is already
created, you will have to drop and recreate it (I don't think you can alter
this table attribute).


Nov 12 '05 #3
Ian
Data Goob wrote:
Hi,

I thought we would be able to have indexes in a
separate tablespace from the tables in another
tablespace. So I went and created a INDEXSPACE1,
only to not see the syntax on how to create index
.... in "INDEXSPACE1" . We have 6 nodes on 3
physical servers ( 2 nodes per server ), each
server is a 4-CPU machine.

I cannot find DB2 documentation to support this idea,
is this possible in DB2? ( Separate the indexes from
the tables ).

Also, be aware the both tablespaces must be DMS in order
to do this. You can't separate data/index when using SMS
tablespaces.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #4
"Data Goob" <da******@hotmail.com> wrote in message
news:If******************@fe10.usenetserver.com...
Thanks Mark.

It's a bit un-intuitive and backward to do it this
way, but I guess that's the way it works.

It is more straightforward on DB2 for z/OS (mainframe) where the indexspace
is defined with the create index statement.

But that is partly because the original DB2 UDB (OS/2 Database Manager) did
not allow separate tablespaces for indexes. But on DB2 for Unix, Linux, and
Windows, even if the data and indexes are in the same tablespace, they are
not in the same file.

This is different than DB2 for z/OS where a tablespace or indexspace is a
single VSAM dataset (unless the underlying VSAM dataset has gone into
extents).
Nov 12 '05 #5
Thanks for the background.

I'll make sure in the future to specify the index space upfront
when creating tables.

By the way, I have heard that we should create one server partition
for each CPU for performance. As I mentioned before we have 3 physical
servers, 4-CPUs each. We're on DB2 EEE. Today they have 2 partitions
each, for a total of 6 partitions. Should we move to 4 partitions per
server? Can I re-partition on an existing database and cluster?

Thanks again to you and the others for great background and help!

"Mark A" <ma@switchboard.net> wrote in message news:XR****************@news.uswest.net...
"Data Goob" <da******@hotmail.com> wrote in message
news:If******************@fe10.usenetserver.com...
Thanks Mark.

It's a bit un-intuitive and backward to do it this
way, but I guess that's the way it works.

It is more straightforward on DB2 for z/OS (mainframe) where the indexspace
is defined with the create index statement.

But that is partly because the original DB2 UDB (OS/2 Database Manager) did
not allow separate tablespaces for indexes. But on DB2 for Unix, Linux, and
Windows, even if the data and indexes are in the same tablespace, they are
not in the same file.

This is different than DB2 for z/OS where a tablespace or indexspace is a
single VSAM dataset (unless the underlying VSAM dataset has gone into
extents).


Nov 12 '05 #6
"Data Goob" <da******@hotmail.com> wrote in message
news:pO*******************@fe33.usenetserver.com.. .
Thanks for the background.

I'll make sure in the future to specify the index space upfront
when creating tables.

By the way, I have heard that we should create one server partition
for each CPU for performance. As I mentioned before we have 3 physical
servers, 4-CPUs each. We're on DB2 EEE. Today they have 2 partitions
each, for a total of 6 partitions. Should we move to 4 partitions per
server? Can I re-partition on an existing database and cluster?

Thanks again to you and the others for great background and help!

You can add additional partitions to an existing database.

The decision as to how many partitions per physical node depends on other
factors such as number of separate disk controllers and their bandwidth,
disk configuration (preferably separate arrays or disks for each partition),
physical memory that can be allocated for each partition, and possibly the
number of Ethernet ports.

Having 2 processors per partition might not be wasted if intra-partition
parallelism is being utilized, although inter-partition parallelism is more
predictable.
Nov 12 '05 #7
Ian
Data Goob wrote:
By the way, I have heard that we should create one server partition
for each CPU for performance. As I mentioned before we have 3 physical
servers, 4-CPUs each. We're on DB2 EEE. Today they have 2 partitions
each, for a total of 6 partitions. Should we move to 4 partitions per
server? Can I re-partition on an existing database and cluster?


The most compelling reason that I have had to have a 1:1 CPU:Partition
ratio is to maximize utility performance (especially LOAD).

I would start with 6 partitions (2:1 CPU:Partition) and evaluate based
on your requirements.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #8
Mark A wrote:
"Data Goob" <da******@hotmail.com> wrote in message
news:If******************@fe10.usenetserver.com...
Thanks Mark.

It's a bit un-intuitive and backward to do it this
way, but I guess that's the way it works.

It is more straightforward on DB2 for z/OS (mainframe) where the

indexspace is defined with the create index statement.

But that is partly because the original DB2 UDB (OS/2 Database Manager) did not allow separate tablespaces for indexes. But on DB2 for Unix, Linux, and Windows, even if the data and indexes are in the same tablespace, they are not in the same file.

This is different than DB2 for z/OS where a tablespace or indexspace is a single VSAM dataset (unless the underlying VSAM dataset has gone into
extents).


v7.1-z/os-1.x

well, we were getting -904 on tables, so the MF guys ran the recover on
the table, but then got -904 on the index. so it had to be run again.
no problem, really. except in trying to understand the sequence of
events, i find that there is no description of calling an indexspace in

the current docs available on-line from ibm. it appears that an index
goes into a "space" named for the index in all cases. is this an
undocumented clause in the CREATE TABLE or CREATE INDEX statments??

looking at SYSINDEXES, the INDEXSPACE column is always the index name.
with the following exceptions: the plan table(s), indexes with 8
character names (the indexspace is the truncated name), and indexes
with
names longer than 8 characters (the indexspace is a concatenation of
a base string and a random string).

thanks,
robert

Nov 12 '05 #9

<gn*****@rcn.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
Mark A wrote:
"Data Goob" <da******@hotmail.com> wrote in message
news:If******************@fe10.usenetserver.com...
Thanks Mark.

It's a bit un-intuitive and backward to do it this
way, but I guess that's the way it works.

It is more straightforward on DB2 for z/OS (mainframe) where the

indexspace
is defined with the create index statement.

But that is partly because the original DB2 UDB (OS/2 Database

Manager) did
not allow separate tablespaces for indexes. But on DB2 for Unix,

Linux, and
Windows, even if the data and indexes are in the same tablespace,

they are
not in the same file.

This is different than DB2 for z/OS where a tablespace or indexspace

is a
single VSAM dataset (unless the underlying VSAM dataset has gone into
extents).


v7.1-z/os-1.x

well, we were getting -904 on tables, so the MF guys ran the recover on
the table, but then got -904 on the index. so it had to be run again.
no problem, really. except in trying to understand the sequence of
events, i find that there is no description of calling an indexspace in

the current docs available on-line from ibm. it appears that an index
goes into a "space" named for the index in all cases. is this an
undocumented clause in the CREATE TABLE or CREATE INDEX statments??


It's quite well documented in "CREATE TABLE" -- look for "INDEX IN".

http://publib.boulder.ibm.com/infoce...n/r0000927.htm

--
Matt Emmerton
Nov 12 '05 #10
Even I thought so!!
wonder what went wrong where (wwwww)

regards,
dotyet

Nov 12 '05 #11

Matt Emmerton wrote:
<gn*****@rcn.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
Mark A wrote:
"Data Goob" <da******@hotmail.com> wrote in message
news:If******************@fe10.usenetserver.com...
> Thanks Mark.
>
> It's a bit un-intuitive and backward to do it this
> way, but I guess that's the way it works.
>
>
It is more straightforward on DB2 for z/OS (mainframe) where the indexspace
is defined with the create index statement.

But that is partly because the original DB2 UDB (OS/2 Database

Manager) did
not allow separate tablespaces for indexes. But on DB2 for Unix,

Linux, and
Windows, even if the data and indexes are in the same tablespace,

they are
not in the same file.

This is different than DB2 for z/OS where a tablespace or indexspace
is a
single VSAM dataset (unless the underlying VSAM dataset has gone
into extents).


v7.1-z/os-1.x

well, we were getting -904 on tables, so the MF guys ran the

recover on the table, but then got -904 on the index. so it had to be run again. no problem, really. except in trying to understand the sequence of
events, i find that there is no description of calling an indexspace in
the current docs available on-line from ibm. it appears that an index goes into a "space" named for the index in all cases. is this an
undocumented clause in the CREATE TABLE or CREATE INDEX statments??


It's quite well documented in "CREATE TABLE" -- look for "INDEX IN".

http://publib.boulder.ibm.com/infoce...n/r0000927.htm
--
Matt Emmerton


that's the UDB docs, not 390.

Nov 12 '05 #12

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

Similar topics

6
15994
by: David Brown | last post by:
With MySQL is it possible to have indexes or tables held in RAM? If so how do I ensure that updates are copied to disk? Regards, Dave.
1
2570
by: Dominic Marks | last post by:
Hi, (I apologise if this is the wrong list, I haven't posted to a postgresql.org mailing list before, general seemed like a good catch-all) I am trying to implement a centralised...
57
25466
by: Bing Wu | last post by:
Hi all, I am running a database containing large datasets: frames: 20 thousand rows, coordinates: 170 million row. The database has been implemented with: IBM DB2 v8.1
2
4326
by: Molly | last post by:
Does anyone know of any good tools for fast, on-line reorgs of a very large DB2 UDB table? We need to reorg a couple of our large (+1 billion rows) tables. We migrated from V7.2 to V8.1, but we...
3
2344
by: MaRCeLO PeReiRA | last post by:
Hi guys, Is there a way I can separate things in PostgreSQL? Putting tables in a disk partition and indexes in another one????? Regards, MaRcELo PeReiRa PHP/SQL/PostgreSQL
10
7669
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
0
1633
by: asorkoram | last post by:
Hello, I have a 3rd party app that uses SQL server to store its data. I am also creating a MS Access 2003 app to access the data. When I import the tables a few of the tables have over the 32 index...
0
1217
by: asorkoram | last post by:
Hello, I have a 3rd party app that uses SQL server to store its data. I am also creating a MS Access 2003 app to access the data. When I import the tables a few of the tables have over the 32 index...
16
4809
by: Okonita via DBMonster.com | last post by:
Hi all, I am comming along with all this Linus/DB2/scripting business...I am no longer scared of it!! (LOL). But, I need to create a .ksh script that does a REORGCHK and output only tables...
0
7198
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
7072
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
7271
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,...
1
6979
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...
0
5570
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
4998
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
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
373
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...

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.