By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,851 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,851 IT Pros & Developers. It's quick & easy.

clob question.

P: n/a

I have table test (c1 varchar(255) and c2 clob).
Table contains 100 rows . Both columns contains the SAME value (
some short text of 150 bytes).

Now, if I'm fetching both columns to some text files.
db2 select c1 from test >file1.txt
db2 select c2 from test >file2.txt

And? file1.txt has size of some 15Kb(that's ok!)
but file2.txt has size of 1 mb! (there are some extra non-printable
characters). Within application these differences are not visible.
The problem is that it takes very very long to fetch data over slow wan.

database character encoding is set to utf8.

thanks a lot for any hint!
Kaccper.

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
trial and error...
try : db2 select substr(c2, 1, 150) from test >file2.txt. If the
performance improves, then you can consider fetching the lob column
using lob locator. When materializing the lob, you can append the lob
one chunk at a time, using substr.

e.g.

loop (until loblocator.length < end)
lob = lob || substr(loblocator, start, end)
increment start and end
end

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.