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 > How can I force db2 to use temporary tablespace for result table in declare cursor ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-24-06, 12:13
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
How can I force db2 to use temporary tablespace for result table in declare cursor ?

Hi All,
We work with db2v8.2.2 and aix5.2

after tuning sql statement in declare cursor the FETCH part of program became slower than before and I found out this time db2 does not use temporary table space for result table and result table is derived during the excution of FETCH statement.

how can I force db2 to use temporary tablespace?

Thank you in advance for your help.
Reply With Quote
  #2 (permalink)  
Old 03-24-06, 20:23
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You could try to add an ORDER BY clause which is not supported by an index. But I don't know if it would run faster.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-25-06, 15:15
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
Quote:
Originally Posted by Marcus_A
You could try to add an ORDER BY clause which is not supported by an index. But I don't know if it would run faster.
Thank you Marcus
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