473,837 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

temporary tablespaces requirement size for creating indexes

hi , all .

I got a question about creating indexes in db2 .

a table has 44236333 rows
an index planed to be build include 2 field ( 6 byte )
accordding to db2 document
temporary tablespaces requirement size will be
(6+9)*44236333* 3.2/1024/1024/1024 = 1.98G

now , i have 6G of my temporary tablespaces , i still fail to create
this index , saying " file system is full "

any help ?? thx ...

May 8 '07 #1
11 6329
rawu wrote:
hi , all .

I got a question about creating indexes in db2 .

a table has 44236333 rows
an index planed to be build include 2 field ( 6 byte )
accordding to db2 document
temporary tablespaces requirement size will be
(6+9)*44236333* 3.2/1024/1024/1024 = 1.98G

now , i have 6G of my temporary tablespaces , i still fail to create
this index , saying " file system is full "
Do you have enough space for the logs as well?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
May 8 '07 #2
On May 8, 2:34 pm, rawu <Herma...@gmail .comwrote:
hi , all .

I got a question about creating indexes in db2 .

a table has 44236333 rows
an index planed to be build include 2 field ( 6 byte )
accordding to db2 document
temporary tablespaces requirement size will be
(6+9)*44236333* 3.2/1024/1024/1024 = 1.98G

now , i have 6G of my temporary tablespaces , i still fail to create
this index , saying " file system is full "

any help ?? thx ...
hi, for this kind of error, there's a very big possibility that which
file system is full is pointed out in the db2diag.log. this file is
located at ~/sqllib/db2dump by default.

May 8 '07 #3
On 5月8日, 下午7时33分, Hardy <wyh...@gmail.c omwrote:
On May 8, 2:34 pm, rawu <Herma...@gmail .comwrote:
hi , all .
I got a question about creating indexes in db2 .
a table has 44236333 rows
an index planed to be build include 2 field ( 6 byte )
accordding to db2 document
temporary tablespaces requirement size will be
(6+9)*44236333* 3.2/1024/1024/1024 = 1.98G
now , i have 6G of my temporary tablespaces , i still fail to create
this index , saying " file system is full "
any help ?? thx ...

hi, for this kind of error, there's a very big possibility that which
file system is full is pointed out in the db2diag.log. this file is
located at ~/sqllib/db2dump by default.

May 9 '07 #4
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/lv1 2097152 0 100% 106 67% /dbtemp/
NODE0000
/dev/lv2 2097152 0 100% 7 8% /dbtemp/
NODE0001
/dev/lv3 1024.00 9.75 100% 7 1% /dbtemp/
NODE0002
/dev/lv4 1024.00 9.54 100% 7 1% /dbtemp/
NODE0003
/dev/lv_dbbase 4194304 932480 78% 1562 2% /dbbase
/dev/lv5 1572864 785376 51% 12 1% /dblog/
NODE0000
/dev/lv7 1048576 261184 76% 12 1% /dblog/
NODE0001
---------------------------------------------------------------

I traced the whole procedure , run command "df" and got a result as
above when it failed down .
The first four are patitions for temporary tablespace, and the 5th
line is where db2diag.log located.
I think it's clear that the problem is temp tbs 's size .

May 9 '07 #5
rawu wrote:
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/lv1 2097152 0 100% 106 67% /dbtemp/
NODE0000
/dev/lv2 2097152 0 100% 7 8% /dbtemp/
NODE0001
/dev/lv3 1024.00 9.75 100% 7 1% /dbtemp/
NODE0002
/dev/lv4 1024.00 9.54 100% 7 1% /dbtemp/
NODE0003
/dev/lv_dbbase 4194304 932480 78% 1562 2% /dbbase
/dev/lv5 1572864 785376 51% 12 1% /dblog/
NODE0000
/dev/lv7 1048576 261184 76% 12 1% /dblog/
NODE0001
---------------------------------------------------------------

I traced the whole procedure , run command "df" and got a result as
above when it failed down .
The first four are patitions for temporary tablespace, and the 5th
line is where db2diag.log located.
I think it's clear that the problem is temp tbs 's size .
What's the situation when your procedure is not run? How much temp space do
you have then?

Have you analyzed (access plan) the SQL statements inside the procedure to
see if one of them uses a some temp space?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
May 9 '07 #6

Ok rawu... what's in the db2diag.log ?

May 9 '07 #7
On May 8, 2:34 am, rawu <Herma...@gmail .comwrote:
hi , all .

I got a question about creating indexes in db2 .

a table has 44236333 rows
an index planed to be build include 2 field ( 6 byte )
accordding to db2 document
temporary tablespaces requirement size will be
(6+9)*44236333* 3.2/1024/1024/1024 = 1.98G

now , i have 6G of my temporary tablespaces , i still fail to create
this index , saying " file system is full "

any help ?? thx ...
rawu, what version of DB2 are you using? I believe prior to DB2 9
there was a limitation in the number of rows DB2 for LUW could store
on a single data page, I believe the limit was 256. Creating an index
requires a sort of the data, which will likely spill to the temporary
tablespace, given your data volume. Because your row width is so
narrow, you might end up with not fully populated temp pages when sort
is spilling. What is your temporary tablespace page size? If you can't
add more space to the tabelspace containers, then you could try using
a smaller page size for your temp.

Hope this helps,
Miro

May 9 '07 #8
On 5月9日, 下午4时46分, Knut Stolze <sto...@de.ibm. comwrote:
>
What's the situation when your procedure is not run? How much temp spacedo
you have then?

Have you analyzed (access plan) the SQL statements inside the procedure to
see if one of them uses a some temp space?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
sorry , my mistake , use a word "procedure" .
Maybe you misunderstand me , i just create a index , not craete a
procedure .

May 11 '07 #9
On 5月9日, 下午11时50分, mirof007 <mirof...@gmail .comwrote:
rawu, what version of DB2 are you using? I believe prior to DB2 9
there was a limitation in the number of rows DB2 for LUW could store
on a single data page, I believe the limit was 256. Creating an index
requires a sort of the data, which will likely spill to the temporary
tablespace, given your data volume. Because your row width is so
narrow, you might end up with not fully populated temp pages when sort
is spilling. What is your temporary tablespace page size? If you can't
add more space to the tabelspace containers, then you could try using
a smaller page size for your temp.

Hope this helps,
Miro
thx .. my DB version is V8.5
I have another try yesterday ..
Given the whole data of this table cost about 7G of tablespace
I enlarge the temporary tablespaces size to 8G .
And this time , i create the index successfully .
And I get that , the peak consumption of temporary tablespaces is
67% .
That means it requires temp tablepace size up to 1:1 of data of table
to create index .
And I guess , db2 runs like that : copy all columes rather than the
columes included by index to temporary tablespace , and then sort ,
and then copy data to index tablespace . ...
So .. i need size as much as the data table .
So .. no matter how many columns index includes , it requires the same
size of temporary tablespace ..
Am I right ??

May 11 '07 #10

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

Similar topics

18
8778
by: zebi | last post by:
hello, What's your opinion : The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 / multiprocessor ) is DMS ou SMS ? Thanks ZEB
1
6260
by: Erik Hendrix | last post by:
Hi, I have a question here regarding setting the prefetch size. So far we took the rule that for OLTP, prefetchsize = extent size and for DSS prefetchsize = extent size * number. However, especially due to the "Skip Scans" for indexes I started to question this. It looks to me that for reading a index DB2 will or do a synchronous read or he will have to scan the whole index and thus prefetch the data correct? If this is so, then it...
4
2488
by: mairhtin o'feannag | last post by:
Hello, I want to ask the question "how large is each of the indexes in a particular tablespace??" since I want to know which user-created indexes are taking up huge amounts of space. I used the following query to determine *WHICH* indexes are in the tablespace in question. Now I just need to get the size of each of the indexes returned. select cast(i1.indschema as char(15)) index_schema, cast(i1.indname as char(25)) index_name,
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
1278
by: rcamarda | last post by:
As some readers of this newgroup can recall, I use Cognos' program called Data Manager to build my data warehouse. I has the ability to create indexes, however I cannot add other arguments to its command. It has a basic command such as CREATE INDEX PERSONNEL_ID ON "dbo"."F_Personnel_Detail" ( "PERSONNEL_ID" ) The index by default is built in the PRIMARY filegroup. I am testing out putting the indexes in their own filegroups and testing...
4
4006
by: RobertoRigoli | last post by:
Hi, I should create a new tablespaces with a page size to 32K, with e buffer pool dedicated with the same page size. The temporary tablespaces page size is 4K, I have to modify the temporary tablespaces to the max page size defined into database (32K ) ? Thanks for your help Roberto.
0
1968
by: johnfinch | last post by:
I am currently running DB2 for Z/OS V7.1. When I try to create and index on a declared temporary table, a -690 SQL return code occurs. My declarations are as below : DECLARE GLOBAL TEMPORARY TABLE SESSION.TEMP_ACCBB ( PLAN_NO CHAR(11) NOT NULL, PLAN_STATE_NO INTEGER NOT NULL, LIFE_INDICATOR CHAR(1) NOT NULL, ...
0
1204
by: okonita | last post by:
Hi all, I need to create one or two indexes on date columns to support MAX and MIN aggregate functions on a very large table and to make the SQL perform/run faster. I remember a group discussion sometime ago that creating an index on the date column ASCENDING or DESCENDING will be the thing to do. Is that still true? Does anyone have or know of a good discussion of the pros and cons of doing what I am trying to accomplish? Any...
6
3326
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
9846
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we抣l explore What is ONU, What Is Router, ONU & Router抯 main usage, and What is the difference between ONU and Router. Let抯 take a closer look ! Part I. Meaning of...
0
9685
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,...
0
10886
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10580
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10277
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
9413
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梡lanning, coding, testing, and deployment梬ithout 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...
0
7007
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5853
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3126
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.