Memory Tablespaces
 Tablespaces in which memory-resident data is saved
Architecture (Memory TBS + Checkpoint Image File...
Allocation of space in a memory tablespace
Space is allocated in 32KB page units
Page Status: Free or Used
Object Free U...
Changes to the Status of Pages
 When a DELETE statement is executed on a table
 The status of empty pages in the table ...
How spaces are allocated
Create table T1
1 2 3 4
5 6 7 8
1
Insert data into T1
1
Insert data into T1
1 2
3
1
1 2 3
Memory...
How spaces are returned
1 2 3 4
5 6 7 8
Memory Tablespace
T1
1 2
3 4
21 3 4
65 7 8
COMPACTION on T1
1 2
3 4
INSERT data i...
Upcoming SlideShare
Loading in …5
×

[Altibase] 4-2 memory tablespace

240 views

Published on

memory 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
240
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

[Altibase] 4-2 memory tablespace

  1. 1. Memory Tablespaces  Tablespaces in which memory-resident data is saved Architecture (Memory TBS + Checkpoint Image Files) log file# log file# log file# log file# log file# Checkpoint Image-#-0 Checkpoint Image-#-1 Disk Memory Fuzzy / Ping-Pong Checkpointing Memory TBS
  2. 2. Allocation of space in a memory tablespace Space is allocated in 32KB page 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 a page unit •Space 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 unless the data is deleted
  3. 3. Changes to the Status of Pages  When a DELETE statement is executed on a table  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 compaction is performed after a DELETE statement, empty pages are returned to the tablespace (they are usable by other tables) and their status in the tablespace changes from “Used” to “Free”.  When TRUNCATE TABLE is executed on a table  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 is executed on a table  When data is transferred to another table using the MOVE statement, the empty pages are reusable only in the table from which the data were moved (same effect as DELETE execution).  The pages are returned to the tablespace when compaction is later performed.
  4. 4. How spaces are allocated Create table T1 1 2 3 4 5 6 7 8 1 Insert data into T1 1 Insert data into T1 1 2 3 1 1 2 3 Memory Tablespace
  5. 5. How spaces are returned 1 2 3 4 5 6 7 8 Memory Tablespace T1 1 2 3 4 21 3 4 65 7 8 COMPACTION on T1 1 2 3 4 INSERT data into T2 5 6 7 8 TRUNCATE on T1 1 2 3 4 DELETE on T1 3 4 5 6 7 8 3 4 3 4 1 2 3 4

×