Skip to main content
Question

When shall I add ENCODING RLE for column during create projection

  • June 17, 2022
  • 1 reply
  • 3 views

pdhokte

For example,
We have user_events table containing columns session_id, visitor_id & user_id.
The table has
total record count = 1 billion
distinct count for session_id = 100 million (10 records per session_id)
distinct count for visitor_id = 10 million (100 records per visitor_id)
distinct count for user_id = 1 million (1000 records per user_id)

For which columns shall I add 'ENCODING RLE'?

1 reply

Bryan_H
Forum|alt.badge.img+2
  • Participating Frequently
  • June 17, 2022

Vertica's Database Designer can suggest optimized encodings with a single function:
SELECT DESIGNER_DESIGN_PROJECTION_ENCODINGS('projection_name','');
This will write a proposed projection DDL to the console. For more info and options, see the documentation:
https://www.vertica.com/docs/11.1.x/HTML/Content/Authoring/SQLReferenceManual/Functions/VerticaFunctions/DatabaseDesigner/DESIGNER_DESIGN_PROJECTION_ENCODINGS.htm