DB2 9.7 BLOB Storage

Posted on 2011-10-20
Last Modified: 2012-05-12
I have a have table in db2 9.7 like
              SEQUENCE_NO INT (10, 0) NOT NULL,
              IMG BLOB (524288) LOGGED NOT COMPACT,
              IMG_TYPE VARCHAR (3),
              SCAN_BY VARCHAR (10),
              SCAN_TIME TIME  
             COMPRESS YES  
             IN LOBSTBS;
My image type is tiff, size 12K. But if I insert this row into the database, “.LB file” grows 250MB. I can’t understand why this happens, b/c if I extract the image from database the size is “12K”.
Question by:sgogan
    LVL 45

    Accepted Solution

    Hi sgogan,

    The file won't grow 250MB for each file that you add.  :)

    Like most DBMS, DB2 blocks/buffers data.   It suggests that DB2 has created 1/4 Gig of storage space for the BLOB objects.  Since they can eat up a lot of space in a hurry, DB2 has allocated 1/4 GB the first time that it had to insert an BLOB.  You shouldn't see that change for about a 1,000 inserts now.  :)

    LVL 34

    Assisted Solution

    by:Gary Patterson
    If you expect most of your rows to contain a LOB, and the LOBs are generally small, you do have the options to store small LOB's inline in V9.7:

    - Gary Patterson
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
    Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now