Skip to main content

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

  • August 1, 2014
  • 4 replies
  • 7 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
  • August 1, 2014

Sajan_Sangraula
Forum|alt.badge.img+1
  • Participating Frequently
  • August 1, 2014
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
  • August 1, 2014
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
  • August 2, 2021

This is now possible starting in Vertica 10!

See: Changing Projection Column Encodings