Summarize a Table’s Projections
[Deleted User]
Administrator
Jim Knicely authored this tip.
Use the built-in Vertica function GET_TABLE_PROJECTIONS to quickly summarize the details of all of the projections of a Vertica table.
Example:
dbadmin=> \a Output format is unaligned. dbadmin=> \t Showing only tuples. dbadmin=> SELECT get_table_projections('public.jim'); Current system K is 1. # of Nodes: 3. Table public.jim has 3 projections. Projection Name: [Segmented] [Seg Cols] [# of Buddies] [Buddy Projections] [Safe] [UptoDate] [Stats] ---------------------------------------------------------------------------------------------------- public.jim_replicate [Segmented: No] [Seg Cols: ] [K: 2] [public.jim_replicate] [Safe: Yes] [UptoDate: Yes] [Stats: Yes] public.jim_b1 [Segmented: Yes] [Seg Cols: "public.jim.c1", "public.jim.c2"] [K: 1] [public.jim_b0] [Safe: Yes] [UptoDate: Yes] [Stats: Yes] public.jim_b0 [Segmented: Yes] [Seg Cols: "public.jim.c1", "public.jim.c2"] [K: 1] [public.jim_b1] [Safe: Yes] [UptoDate: Yes] [Stats: Yes]
Have fun!
0