what is ROS containers exactly?

Is it a data file present under catalog_dir/subdir/  or a sub-directory of catalogdir?

is it physically visible? 

Comments

  •  Quite important topic this one ! 

       Read Optimized Store (ROS) is a highly optimized, read-oriented, disk storage structure, organized by projection. The ROS makes heavy use of compression and indexing.

    A ROS container can be considered a file created by the following actions:

    •  A COPY DIRECT statement.
    •  An INSERT, DELETE or UPDATE statement with the /*+direct*/ hint.
    • A Moveout of WOS data to ROS by the Tuple Mover
    •  A Mergeout from a number of ROS files into a new ROS file.
    •  The MERGE_PARTITION() function.

    Note:

    - a ROS container is write once file, so if you have some data in the ROS you will need ot update then a new ROS container will be created with the new data version and the old ROS will be dropped. 

     

    Vertica imposes a limit of 1024 ROS Containers per projection. This is well related to the operation system limits as i said before a ROS is a file.

     

    For more info on your db ROS containters see STORAGE_CONTAINERS table. 

     

    Let me make it more easy for you:

    dbadmin=> \x
    Expanded display is on.

    -- take storage id 45036002965404849 for example

    dbadmin=> select * from STORAGE_CONTAINERS where storage_oid='45036002965404849';
    -[ RECORD 1 ]-------+-------------------------------------------------
    node_name | v_db_node0004
    schema_name | dev_db
    projection_id | 45035998746403828
    projection_name | Fact1_super_b0
    storage_type | ROS
    storage_oid | 45036002965404849
    sal_storage_id | 0100000000000000000000000000000000a000018edb3cb1
    total_row_count | 65
    deleted_row_count | 0
    used_bytes | 6862
    start_epoch | 1600027
    end_epoch | 1600027
    grouping | PROJECTION
    segment_lower_bound | 4294967295
    segment_upper_bound | 1431655764
    is_sorted | t
    location_label | T1_DATA
    delete_vector_count | 0

    -- look for it in your operational system , look for the folder 849 (the last 3 digits of your storage_oid), and since i have my storage labeled i know is in the T1_DATA folder.


    dbadmin=> \! find /vertica_storage/t1_data/ -name 849
    /vertica_storage/t1_data/849

    -- now see the content of the full path to the folder + the storage_oid, like below

    dbadmin=> \! ls -la /vertica_storage/t1_data/849/45036002965404849 | grep 45036002965404849
    -rw------- 1 dbadmin verticadba 133 Feb 12 16:34 45036002965404849_0.fdb
    -rw------- 1 dbadmin verticadba 56 Feb 12 16:34 45036002965404849_0.pidx

    -- there you go !
    -- you have a .fdb file and a .pidx file
    .fdb - file is the data itself (encoded and compressed)
    .pidx - contains index/statistics info from the data file.

     I hope this was helpful :) 

     

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file