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.
db2newbie - 30 Jul 2005 07:05 GMT
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