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 > large object question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-23-05, 13:03
udbdb2 udbdb2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 121
large object question

If we define lob or blob with some specific size, but if it uses only few for somw rows not the full size, does db2 consume full size or whatever allocated ?

( For example in case of varchar(10) ,if you insert only 5 letter string like 'abcde' it only consumes varchar(5) , does this appy to lob/clob/blob also ? )

TIA.
Reply With Quote
  #2 (permalink)  
Old 02-23-05, 14:36
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
IIRC, it will occupy only the required amount of disk space

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 02-23-05, 16:48
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Keep in mind that DB2 does not use bufferpools for LOB data, so all reads and writes are synchronous I/O to disk. It is better to use varchar if possible to store such objects unless they will not fit, or performance is not important. I have clearly seen a degradation in performance with tables that have LOB columns using SQL Statement Monitoring snapshots.
__________________
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
  #4 (permalink)  
Old 02-24-05, 10:43
udbdb2 udbdb2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 121
any suggestio on BP tunning for this

for lob is there any specific bufferpoold should be created ?
what is your experience ?
TIA.
Reply With Quote
  #5 (permalink)  
Old 02-24-05, 12:28
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by udbdb2
for lob is there any specific bufferpoold should be created ?
Quote:
Originally Posted by Marcus_A
Keep in mind that DB2 does not use bufferpools for LOB data
You probably could create a separate tablespace for your LOBS using file containers - in that case the file system cache will help.
Reply With Quote
  #6 (permalink)  
Old 02-24-05, 13:06
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I don't think that DB2 can use bufferpools for LOB objects, becasue they are too large and don't fit in 4K, 8K, 16K, or 32K chunks.

In fact, the LOB objects for the DB2 catalog are stored in the CATALOGCACHE_SZ memory heap. The regular catalog table data are in the SYSCATSPACE tablespace and its associated bufferpool.
__________________
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
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