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 > Column data type

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-15-04, 02:34
dr_suresh20 dr_suresh20 is offline
Registered User
 
Join Date: Sep 2003
Posts: 218
Column data type

Hi,

I am using db2 ese 8.1.4a on win2k.

I have a table with 20+ columns out of which 'Remarks" column has a data type varchar(2000) definition residing in a long tablespace. Now, it seems the present value is not sufficient to hold enough comments data & therefore there is a need to increase it to varchar(7000).
My question is:
- Is this ok to increase the value to 7000 characters.
- Are there any issues if we increase the value? if so, what is the workaround?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 04-15-04, 03:07
andrew348 andrew348 is offline
Registered User
 
Join Date: Mar 2004
Location: Belarus
Posts: 5
Hi!

Generally, there is no problems with increasing VARCHAR field, the only thing you have to care if the new row's size (sum of all column's lenght) will fit into you tablespace's page.

Just use RUNSTATS after altering the column.

The only problem with 7k column size is that it cannot be passed to functions resided in SYSFUN schema.

Regards.
Reply With Quote
  #3 (permalink)  
Old 04-15-04, 07:03
dr_suresh20 dr_suresh20 is offline
Registered User
 
Join Date: Sep 2003
Posts: 218
andrew348 - Thank you for your response. Question for you:

<<The only problem with 7k column size is that it cannot be passed to functions resided in SYSFUN schema.>>

- What impact does this have on overall system performance?

Thanks & Regards.
Reply With Quote
  #4 (permalink)  
Old 04-15-04, 07:33
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
It the column is fully populated, then you will need to move the table to a tablespace with at least 8K page size. You will also need to create a buffer pool with a page size to match the tablespace size. This "could" reduce the total amount of space available for other objects that can fit in the buffer pools.
__________________
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
  #5 (permalink)  
Old 04-19-04, 02:35
dr_suresh20 dr_suresh20 is offline
Registered User
 
Join Date: Sep 2003
Posts: 218
I will ensure a separate tablespace is created for row length > 4k and fit in all objects that fall under this category.

Thanks for your help.
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