I find it fundamental for a DBA to understand what is going on under the hood of your DB engine. One of the strong point of HP Vertica database are the ROS and WOS storage types and is ideal that every DBA that works with Vertica should know what are the steps taken by the database during the process of storing data into the database. Unlike other database that store data into tablespaces(logical group of data files in Oracle) or filegroup(SQL Server) Vertica stores data into containers, and this containers are of two type : WOS or ROS containers.
[dbadmin@DCXLG001 v_d_node0001_data]$ pwd
/home/dbadmin/d/v_d_node0001_data
[dbadmin@DCXLG001 v_d_node0001_data]$ tree -sD
.
+-- [ 4096 Apr 16 8:22] 311
+-- [ 4096 Apr 16 8:22] 315
+-- [ 4096 Apr 16 8:22] 319
+-- [ 4096 Apr 16 8:22] 321
+-- [ 4096 Apr 16 8:22] 325
+-- [ 4096 Apr 16 8:22] 329
+-- [ 4096 Apr 16 8:52] 611
+-- [ 4096 Apr 16 8:52] 615
+-- [ 4096 Apr 16 8:52] 625
+-- [ 4096 Apr 16 8:52] 629
+-- [ 4096 Apr 16 8:22] 675
+-- [ 4096 Apr 16 8:22] 679
+-- [ 4096 Apr 16 8:22] 683
+-- [ 4096 Apr 16 8:52] 783
+-- [ 4096 Apr 16 8:52] 787
+-- [ 4096 Apr 16 8:53] 821
+-- [ 4096 Apr 16 8:53] 825
+-- [ 4096 Apr 14 13:37] RejectionTableData
create table one (id int);
-- insert data into table one
dbadmin= insert into one values(1);
OUTPUT
------
1
[dbadmin@DCXLG001 v_d_node0001_data]$ tree -sD
.
+-- [ 4096 Apr 16 8:22] 311
+-- [ 4096 Apr 16 8:22] 315
+-- [ 4096 Apr 16 8:22] 319
+-- [ 4096 Apr 16 8:22] 321
+-- [ 4096 Apr 16 8:22] 325
+-- [ 4096 Apr 16 8:22] 329
+-- [ 4096 Apr 16 8:52] 611
+-- [ 4096 Apr 16 8:52] 615
+-- [ 4096 Apr 16 8:52] 625
+-- [ 4096 Apr 16 8:52] 629
+-- [ 4096 Apr 16 8:22] 675
+-- [ 4096 Apr 16 8:22] 679
+-- [ 4096 Apr 16 8:22] 683
+-- [ 4096 Apr 16 8:52] 783
+-- [ 4096 Apr 16 8:52] 787
+-- [ 4096 Apr 16 8:53] 821
+-- [ 4096 Apr 16 8:53] 825
+-- [ 4096 Apr 14 13:37] RejectionTableData
dbadmin= select * from storage_containers;
-[ RECORD 1 ]-------+------------------
node_name | v_d_node0001
schema_name | public
projection_id | 45035996273732732
projection_name | one_super
storage_type | WOS
storage_oid | 45035996273732743
total_row_count | 1
deleted_row_count | 0
used_bytes | 16384
start_epoch | 7
end_epoch | 7
grouping | ALL
segment_lower_bound | 0
segment_upper_bound | 4294967295
is_sorted | f
location_label |
delete_vector_count | 0
dbadmin= SELECT parameter_name, current_value FROM configuration_parameters where parameter_name='MoveOutInterval';
parameter_name | current_value
-----------------+---------------
MoveOutInterval | 300
dbadmin= select run_tuple_mover_once();
-[ RECORD 1 ]--------+---------------------
run_tuple_mover_once | Tuple mover ran once
dbadmin= select * from storage_containers;
-[ RECORD 1 ]-------+------------------
node_name | v_d_node0001
schema_name | public
projection_id | 45035996273732732
projection_name | one_super
storage_type | ROS
storage_oid | 45035996273732785
total_row_count | 1
deleted_row_count | 0
used_bytes | 51
start_epoch | 7
end_epoch | 7
grouping | PROJECTION
segment_lower_bound | 0
segment_upper_bound | 4294967295
is_sorted | t
location_label |
delete_vector_count | 0
[dbadmin@DCXLG001 v_d_node0001_data]$ tree -sD
¦ +-- [ 4096 Apr 16 9:45] 45035996273732785
¦ +-- [ 3 Apr 16 9:45] 45035996273732785_0.fdb
¦ +-- [ 56 Apr 16 9:45] 45035996273732785_0.pidx
+-- [ 4096 Apr 16 8:52] 787
+-- [ 4096 Apr 16 9:45] 789
¦ +-- [ 4096 Apr 16 9:45] 45035996273732789
¦ +-- [ 48 Apr 16 9:45] 45035996273732789_0.fdb
¦ +-- [ 56 Apr 16 9:45] 45035996273732789_0.pidx
+-- [ 4096 Apr 16 8:53] 821
+-- [ 4096 Apr 16 8:53] 825
+-- [ 4096 Apr 16 9:45] MvO_28.29.del
¦ +-- [ 4096 Apr 16 9:45] 000000
+-- [ 4096 Apr 14 13:37] RejectionTableData
dbadmin= insert /*+ direct */ into one values(1);
dbadmin= select * from storage_containers;
-[ RECORD 1 ]-------+------------------
node_name | v_d_node0001
schema_name | public
projection_id | 45035996273732732
projection_name | one_super
storage_type | ROS
storage_oid | 45035996273732785
total_row_count | 1
deleted_row_count | 0
used_bytes | 51
start_epoch | 7
end_epoch | 7
grouping | PROJECTION
segment_lower_bound | 0
segment_upper_bound | 4294967295
is_sorted | t
location_label |
delete_vector_count | 0
-[ RECORD 2 ]-------+------------------
node_name | v_d_node0001
schema_name | public
projection_id | 45035996273732732
projection_name | one_super
storage_type | ROS
storage_oid | 45035996273732829
total_row_count | 1
deleted_row_count | 0
used_bytes | 51
start_epoch |
end_epoch |
grouping | PROJECTION
segment_lower_bound | 0
segment_upper_bound | 4294967295
is_sorted | t
location_label |
delete_vector_count | 0
[dbadmin@DCXLG001 v_d_node0001_data]$ tree -sD
¦ +-- [ 4096 Apr 16 9:45] 45035996273732785
¦ +-- [ 3 Apr 16 9:45] 45035996273732785_0.fdb
¦ +-- [ 56 Apr 16 9:45] 45035996273732785_0.pidx
+-- [ 4096 Apr 16 8:52] 787
+-- [ 4096 Apr 16 9:45] 789
¦ +-- [ 4096 Apr 16 9:45] 45035996273732789
¦ +-- [ 48 Apr 16 9:45] 45035996273732789_0.fdb
¦ +-- [ 56 Apr 16 9:45] 45035996273732789_0.pidx
+-- [ 4096 Apr 16 8:53] 821
+-- [ 4096 Apr 16 8:53] 825
+-- [ 4096 Apr 16 10:12] 829
¦ +-- [ 4096 Apr 16 10:12] 45035996273732829
¦ +-- [ 3 Apr 16 10:12] 45035996273732829_0.fdb
¦ +-- [ 56 Apr 16 10:12] 45035996273732829_0.pidx
+-- [ 4096 Apr 16 10:12] 833
¦ +-- [ 4096 Apr 16 10:12] 45035996273732833
¦ +-- [ 48 Apr 16 10:12] 45035996273732833_0.fdb
¦ +-- [ 56 Apr 16 10:12] 45035996273732833_0.pidx
+-- [ 4096 Apr 14 13:37] RejectionTableData
dbadmin= insert /*+ direct */ into one values(1);
-[ RECORD 1 ]
OUTPUT | 1
dbadmin= select * from storage_containers;
-[ RECORD 1 ]-------+------------------
node_name | v_d_node0001
schema_name | public
projection_id | 45035996273732732
projection_name | one_super
storage_type | ROS
storage_oid | 45035996273732785
total_row_count | 1
deleted_row_count | 0
used_bytes | 51
start_epoch | 7
end_epoch | 7
grouping | PROJECTION
segment_lower_bound | 0
segment_upper_bound | 4294967295
is_sorted | t
location_label |
delete_vector_count | 0
-[ RECORD 2 ]-------+------------------
node_name | v_d_node0001
schema_name | public
projection_id | 45035996273732732
projection_name | one_super
storage_type | ROS
storage_oid | 45035996273732829
total_row_count | 1
deleted_row_count | 0
used_bytes | 51
start_epoch |
end_epoch |
grouping | PROJECTION
segment_lower_bound | 0
segment_upper_bound | 4294967295
is_sorted | t
location_label |
delete_vector_count | 0
-[ RECORD 3 ]-------+------------------
node_name | v_d_node0001
schema_name | public
projection_id | 45035996273732732
projection_name | one_super
storage_type | ROS
storage_oid | 45035996273732873
total_row_count | 1
deleted_row_count | 0
used_bytes | 51
start_epoch |
end_epoch |
grouping | PROJECTION
segment_lower_bound | 0
segment_upper_bound | 4294967295
is_sorted | t
location_label |
delete_vector_count | 0
[dbadmin@DCXLG001 v_d_node0001_data]$ tree -sD
.
¦ +-- [ 4096 Apr 16 9:45] 45035996273732785
¦ +-- [ 3 Apr 16 9:45] 45035996273732785_0.fdb
¦ +-- [ 56 Apr 16 9:45] 45035996273732785_0.pidx
+-- [ 4096 Apr 16 8:52] 787
+-- [ 4096 Apr 16 9:45] 789
¦ +-- [ 4096 Apr 16 9:45] 45035996273732789
¦ +-- [ 48 Apr 16 9:45] 45035996273732789_0.fdb
¦ +-- [ 56 Apr 16 9:45] 45035996273732789_0.pidx
+-- [ 4096 Apr 16 8:53] 821
+-- [ 4096 Apr 16 8:53] 825
+-- [ 4096 Apr 16 10:12] 829
¦ +-- [ 4096 Apr 16 10:12] 45035996273732829
¦ +-- [ 3 Apr 16 10:12] 45035996273732829_0.fdb
¦ +-- [ 56 Apr 16 10:12] 45035996273732829_0.pidx
+-- [ 4096 Apr 16 10:12] 833
¦ +-- [ 4096 Apr 16 10:12] 45035996273732833
¦ +-- [ 48 Apr 16 10:12] 45035996273732833_0.fdb
¦ +-- [ 56 Apr 16 10:12] 45035996273732833_0.pidx
+-- [ 4096 Apr 16 10:15] 873
¦ +-- [ 4096 Apr 16 10:15] 45035996273732873
¦ +-- [ 3 Apr 16 10:15] 45035996273732873_0.fdb
¦ +-- [ 56 Apr 16 10:15] 45035996273732873_0.pidx
+-- [ 4096 Apr 16 10:15] 877
¦ +-- [ 4096 Apr 16 10:15] 45035996273732877
¦ +-- [ 48 Apr 16 10:15] 45035996273732877_0.fdb
¦ +-- [ 56 Apr 16 10:15] 45035996273732877_0.pidx
+-- [ 4096 Apr 16 10:15] CpD_32.33.del
¦ +-- [ 4096 Apr 16 10:15] 000000
+-- [ 4096 Apr 14 13:37] RejectionTableData
dbadmin= SELECT DO_TM_TASK('mergeout', 'one_super');
-[ RECORD 1 ]------------------------------------------------------------------
DO_TM_TASK | Task: mergeout
(Table: public.one) (Projection: public.one_super)
dbadmin= SELECT parameter_name, current_value FROM configuration_parameters where parameter_name='MergeOutInterval';
parameter_name | current_value
------------------+---------------
MergeOutInterval | 600
dbadmin= select * from storage_containers;
-[ RECORD 1 ]-------+------------------
node_name | v_d_node0001
schema_name | public
projection_id | 45035996273732732
projection_name | one_super
storage_type | ROS
storage_oid | 45035996273733013
total_row_count | 3
deleted_row_count | 0
used_bytes | 53
start_epoch | 7
end_epoch | 8
grouping | PROJECTION
segment_lower_bound | 0
segment_upper_bound | 4294967295
is_sorted | t
location_label |
delete_vector_count | 0
[dbadmin@DCXLG001 v_d_node0001_data]$ tree -sD
.
+-- [ 4096 Apr 16 10:34] 013
¦ +-- [ 4096 Apr 16 10:34] 45035996273733013
¦ +-- [ 5 Apr 16 10:34] 45035996273733013_0.fdb
¦ +-- [ 56 Apr 16 10:34] 45035996273733013_0.pidx
+-- [ 4096 Apr 16 10:34] 017
¦ +-- [ 4096 Apr 16 10:34] 45035996273733017
¦ +-- [ 48 Apr 16 10:34] 45035996273733017_0.fdb
¦ +-- [ 56 Apr 16 10:34] 45035996273733017_0.pidx