Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2002
    Posts
    86

    Unanswered: does db2 reuse space after deletion in insert operation?

    Hi ,
    I have aquestion:
    after deleted about 100,000 recored from a table and then insert record into that table, does db2 reuse the space on that table? or first we should reorge the table and then use insert into table?
    I appriciate if you share your knowledge with me Thanks

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: does db2 reuse space after deletion in insert operation?

    DB2 Reuses the free space in the pages .

    Exception is when the APPEND ON is active for the table.

    Cheers

    Sathyaram

    Originally posted by David2002
    Hi ,
    I have aquestion:
    after deleted about 100,000 recored from a table and then insert record into that table, does db2 reuse the space on that table? or first we should reorge the table and then use insert into table?
    I appriciate if you share your knowledge with me Thanks

  3. #3
    Join Date
    Jul 2002
    Posts
    86

    Re: does db2 reuse space after deletion in insert operation?

    Thank you for your quick response,
    Q: if db2 reuse the the space, why we need to reoge tables sometimes for reclaim the spaces?
    Thanks

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: does db2 reuse space after deletion in insert operation?

    REORG will organize the data which is sparsely distributed in the pages to contigous pages thus freeing up the pages ....

    HTH

    Cheers

    Sathyaram

    Originally posted by David2002
    Thank you for your quick response,
    Q: if db2 reuse the the space, why we need to reoge tables sometimes for reclaim the spaces?
    Thanks

  5. #5
    Join Date
    Sep 2002
    Posts
    30
    Dear Sathyaram,

    BTW, if the table has data originally, then I use DB2 Load REPLACE to load a new set of data.

    In this case, will the space in the tablespace be reused, or still need to do a REORG to reclaim the space after the LOAD?

    Regards,

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    AFAIK, Space will be reused ...



    Originally posted by wongpcl
    Dear Sathyaram,

    BTW, if the table has data originally, then I use DB2 Load REPLACE to load a new set of data.

    In this case, will the space in the tablespace be reused, or still need to do a REORG to reclaim the space after the LOAD?

    Regards,

Posting Permissions

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