Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Partition count per projections and per table

How to get count of partitions are there per projections and also per table? Just wanted to have a track of partitions count as a maintanance activity.

Comments

  • Hi 

     

    You can use partitions table to get this info. Please see below query as an example which demonstrate the same:

     

     

    rchoudhary=> select node_name,table_schema,projection_name,count(distinct(partition_key)) partitions from partitions group by 1,2,3 order by 3 desc;
    node_name | table_schema | projection_name | partitions
    ------------------------+--------------+-----------------+------------
    v_scrutinload_node0002 | public | p_test_b1 | 1
    v_scrutinload_node0003 | public | p_test_b1 | 1
    v_scrutinload_node0001 | public | p_test_b1 | 1
    v_scrutinload_node0002 | public | p_test_b0 | 2
    v_scrutinload_node0001 | public | p_test_b0 | 2
    v_scrutinload_node0003 | public | p_test_b0 | 2
    v_scrutinload_node0002 | public | p_b1 | 1
    v_scrutinload_node0001 | public | p_b0 | 1
    (8 rows)

     

    I hope it helps!!

     

    Regards

    Rahul

     

  • it works. Thanks Rahul

  • Pleasure is all mine :-)

     

    Enjoy your day!!

     

    Regards

    Rahul

Leave a Comment

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

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.