[Altibase] 4-4 disk tablespace

219 views

Published on

disk tablespace

Published in: Software
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
219
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

[Altibase] 4-4 disk tablespace

  1. 1. Allocation of space in a disk tablespace Space is allocated to a table in a 256K extent units Page status: Free or Used Object Free Used Tablespace •Space that is not allocated to any table •Can be allocated to a particular table in extent units •Space that is allocated to a particular table •Cannot be used by any other table until the table returns the page Table •Space that is allocated to a table but contains no data •Can be reused within that table •Space that is allocated to a table and contains data •Cannot be reused as long as the data is not deleted
  2. 2. Changes to the Page Status ♦ When a DELETE statement is executed • The status of empty pages in the table changes from “Used” to “Free” (they are reusable within that table). • The pages are not returned to the tablespace. ♦ When TRUNCATE TABLE is executed • All of the pages that were allocated to the table are returned to the tablespace. • The pages can be used by other tables, and their status in the tablespace changes from “Used” to “Free”. ♦ When MOVE TABLE is executed • The pages can only be reused within the table(Same effect as DELETE) even though the data is moved to other table by MOVE command  COMPACTION cannot be performed on a disk table
  3. 3. How spaces are allocated Disk Tablespace CREATE table T1 INSERT data into T1
  4. 4. How spaces are returned Disk Tablespace T1 INSERT data into T2 Adding Datafile

×