If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > temporary tablespace limit

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-27-11, 08:15
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
temporary tablespace limit

we are using db2 ese on luw 9.5 fp8 on plinux
having a database with tablespaces of different page sizes and also temporary tablespaces of different page sizes.
we have a specific large table, residing in a 32k tablespace.
we run a query that returns a large result set. we are getting the message that the size of the temp.tablesize is hitting the physical limit (according the limits in the doc). but the query uses a 4k temp.tablespace. if it would have used a 32k, we should not have had this problem.
the question is : can we force, by a condition or setting.. that a query uses a larger page size for the temp.tablespace.
you can not drop the 4k tempspace, as it is the only available of this size.
any idea ? thanks for all help/comments
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #2 (permalink)  
Old 07-27-11, 08:24
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
Please create a 32 K page Temp tablespace i.e. TEMPSYS32 and corresponding bufferpool with 32 K pagesize and see the response of the query from db2top.

From your post, it appears in your system only 4 K pagesize Tempspace is existing.
__________________

Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
Reply With Quote
  #3 (permalink)  
Old 07-27-11, 08:29
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
no - not correct
we have a tempspace of 4K 8k and 32k
we would have expected it would use the last one, but it is not.
why would we ask how to force this if none was available ? there would be no choice.
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #4 (permalink)  
Old 07-27-11, 08:50
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
great that you have all the available pagesize tempspace. I came across similar issue last year when one of the user queries were using too much of tempspace with 4K Page, and we thought of creating a 32 K pagesize tempspace as the query was fetching huge number of records towards the tempspace and for that we created a separate bufferpool too. We ensured that the BP size was large enough and the tempspace with 32 K pagesize was having sufficient number of pages.

As much I remember, there was no way to force the optimizer to use a particular pagesize ( say 4K) tempspace. DB2 will prefer the one which can give a better cost.
__________________

Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
Reply With Quote
  #5 (permalink)  
Old 07-27-11, 09:06
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
so how do we overcome the problem - hitting the max limit size of a tablespace ?
this query can not be run anymore.
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #6 (permalink)  
Old 07-27-11, 09:14
shubin_du shubin_du is offline
Registered User
 
Join Date: Feb 2009
Location: Germany
Posts: 23
you can create the new 4K tablespace that is enough large for your query and drop the old small 4k tablespace.
Reply With Quote
  #7 (permalink)  
Old 07-27-11, 09:28
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
as you can see in the doc : there is a physical limit of size in respect to a tablespace
the tempspace is sms on a filesystem of 1T which should be enough for this query
see : Table space page sizes
for 4k pages the tempspace is limited to 64G but for 32k the limit is 512G
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #8 (permalink)  
Old 07-27-11, 09:39
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
Did you create a large enough bufferpool for the 32 K pagesize Tempspace so that the query can get tempted for the 32 K one. I will update more in case come across any other helpful info on this.
__________________

Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
Reply With Quote
  #9 (permalink)  
Old 07-27-11, 09:44
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Try assigning a significantly larger bufferpool to the 32K system temporary tablespace than to the 4K tablspace - this should make optimizer prefer the former.
Reply With Quote
  #10 (permalink)  
Old 07-28-11, 03:59
shubin_du shubin_du is offline
Registered User
 
Join Date: Feb 2009
Location: Germany
Posts: 23
have you found a workaround?
Reply With Quote
  #11 (permalink)  
Old 07-28-11, 04:07
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
I will try the suggestion of n_i "Try assigning a significantly larger bufferpo......"
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #12 (permalink)  
Old 08-01-11, 04:55
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
What if you dropped the 4k temptablespace? DB2 would be forced to use the other ones...... Bit risky, so test 1st I'd say
Reply With Quote
  #13 (permalink)  
Old 08-01-11, 05:19
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
this can NOT be dropped, as it is the only for that page size..
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #14 (permalink)  
Old 08-01-11, 11:34
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Are you sure 4K temp can't be dropped if you already have 32K temp?
Reply With Quote
  #15 (permalink)  
Old 08-01-11, 12:54
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
on 9.5 the first default tempspace gets created with 4 K pagesize. So you can keep on creating other tempspace with higher pagesize say 8K / 16 K, but at any point at least one 4 K tempspace should exist.
__________________

Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi

Last edited by JAYANTA_DATTA; 08-01-11 at 12:55. Reason: typo
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On