View Single Post

   
  #6 (permalink)  
Old 02-27-2008, 11:50 AM
Brian Tkatch
 
Posts: n/a
Default Re: DB2 storing CLOB strings in chunks of 1k

On Mon, 26 Feb 2007 10:30:02 -0500, "Ian Boyd"
<ian.msnews010@avatopia.com> wrote:

>> Actually, that is untrue. LOBs do have limits. Unlikely to ever hit
>> them, but...

>
>As far as i'm concerned character(8000) would be a limit they'll never hit
>either; but you can't explain that to the hoopleheads.
>
>
>
>> Instead, CREATE a separate TABLE for comments.
>>
>> CREATE TABLE Item_Comments
>> {
>> Id AUTONUMBER
>> Item INT REFERENCES ...
>> Comment VARCHAR(32000)
>> }
>>
>> And just chop comments on their way in.
>>
>> Or...
>>
>> Use a VARCHAR in the main TABLE to hold comments up to 255 characters,
>> or the like. And, CREATE a comment TABLE to hold CLOBs.
>>
>> CREATE TABLE Item_Comments
>> {
>> Item INT REFERENCES ...
>> Comment CLOB
>> }
>>
>> Have a TRIGGER check ON INSERT if the value for the comment is more
>> than 255 characters, and if so, INSERT a NULL instead, and INSERT the
>> comment INTO the Comments TABLE instead.
>>
>> Oh, and put LOB in their own TABLESPACE. Just easier for management.

>
>
>
>That would be an okay idea, except that it would require a rewrite of a
>large amount of things. And since we also had our hands tied into using
>Hibernate; it makes it even more of a mess.


Is it possible you could use a VIEW instead? Because the first option
i mentioned should work very well with a VIEW.

>If DB2 is unable to store CLOB text efficiently, then i'd rather tell them:
> "It's a DB2 thing, because you wanted to be able to enter text without
>limit. So either be happy with 4000 characters, or buy a bigger hard drive."


I wonder if we could make idrathertellthem.com

Oh my, http://whatireallywanttosay.com/ is an actual link. /me cries.

B.
Reply With Quote