Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / July 2005

Tip: Looking for answers? Try searching our database.

clob question.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kacper - 29 Jul 2005 15:02 GMT
   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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.