Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2013
    Location
    India
    Posts
    246

    Unanswered: BLOB storage issue

    Dear all,


    Platform: Db2 9.7on AIX


    I have a specific requirement where users have to upload files /graphics in BLOB datatype of table. That input ranges from 15 KB to 9 MB randomly. Due to space and disk constraints i can't afford allocating 10MB BLOB for these thousands of input.

    i want that only that much memory shoud be occupied in database that is equal to the size of of files uploaded. But with BLOB 10 MB , 10 MB space will instatntly be occupied at the time of table creation.

    In this way My lot DB space got wasted unused.

    Please suggest any way arround or any new datatype introduced in DB2 10.1 or later.



    regards

    Sumit
    ssumit

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    blob 10M means : max size is 10M
    or check this page http://publib.boulder.ibm.com/infoce.../c0052385.html
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Sep 2013
    Location
    India
    Posts
    246
    yes, max size is 10 MB but what about storage allocation? i believe 10MB is at once allotted at the time of data insertion, irrespective of actual input file size (10KB , 5MB or what ever).

    is there any solution for the same.

    regards
    sumit
    ssumit

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    have you looked at the link and first entry : LOB (To reduce the amount of disk space......)
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Sep 2013
    Location
    India
    Posts
    246

    staorage of BLOB

    thanks przytula_guy

    i have used COMPACT clause for creating LOB field of table.

    hope it will reduce disk usage.

    But i am unable to understand the output about the storage statistics (allocated/used/free space) of that table. can any body help me in this regard.

    Action: CHECK TABLESPACE
    Tablespace name: USERSPACE1
    Tablespace ID: 2
    Result file name: insp.out
    Table phase start (ID Signed: 424, Unsigned: 424; Tablespace ID: 2) :

    Data phase start. Object: 424 Tablespace: 2
    DAT Object Summary: Total Pages 1 - Used Pages 1 - Free Space 44 %
    Data phase end.

    LOB phase start. Object: 424 Tablespace: 2
    LOB Object Summary: Total Pages 2048 - Used Pages 1291
    LBA Object Summary: Total Pages 3 - Used Pages 3
    LOB phase end.
    Table phase end.

    regards
    sumit
    ssumit

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    use something like this (0)[db2inst1@dlx00003 work]$ db2 "select TBSP_NAME,TBSP_USABLE_PAGES,TBSP_USED_PAGES,TBSP_F REE_PAGES from sysibmadm.SNAPTBSP_PART fetch first row only"

    TBSP_NAME TBSP_USABLE_PAGES TBSP_USED_PAGES TBSP_FREE_PAGES
    -------------------------------------------------------------------------------------------------------------------------------- -------------------- -------------------- --------------------
    SYSCATSPACE 40952 38256 2696

    or look at the doc... (sysibmadm)
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  7. #7
    Join Date
    Sep 2013
    Location
    India
    Posts
    246
    but i want storage statis tics only for table id = 424 stored in tbsp id = 2.
    ssumit

  8. #8
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    I will not indicate what I want .....
    we gave you all kind of hints and tips.. now up to you TO READ THE DOC and find what you exactly need..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  9. #9
    Join Date
    Sep 2013
    Location
    India
    Posts
    246
    thanks.. i will figure it out
    ssumit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •