Skip to main content

Can you change encoding of a column on a projection without recreating the projection?

  • Aug 1, 2014 3:14 AM UTC
  • 4 replies
  • 22 views

May_1
Forum|alt.badge.img+1
  • Participating Frequently
Can you change the encoding type of a column on a projection without recreating the projection? Maybe in an ALTER PROJECTION statement?

4 replies

Daniel_Leybovic
Forum|alt.badge.img+1
  • Participating Frequently
  • Aug 1, 2014 4:11 AM UTC

Sajan_Sangraula
Forum|alt.badge.img+1
  • Participating Frequently
  • Aug 1, 2014 8:41 AM UTC
Your best is to create a new projection with the changed column projection, refresh it using select start_refresh(), and then drop the existing one.

/Sajan

colin_loghin
Forum|alt.badge.img+2
  • Participating Frequently
  • Aug 1, 2014 12:59 PM UTC
Changing the projection encoding would require reorganizing the underlying storage for the column. It is true that if sort order / segmentation is not changed then only the specific column file would be affected and hence would be more effective to reorganize just 1 column rather than all columns, but the feature does not seem to exist. The option is rebuilding the projection in its entirety.

Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • Aug 2, 2021 2:55 PM UTC

This is now possible starting in Vertica 10!

See: Changing Projection Column Encodings