Characteristics of Default Automatic Projections (Encoding)

Moderator: NorbertKrupa

Post Reply
User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Characteristics of Default Automatic Projections (Encoding)

Post by Julie » Tue Nov 04, 2014 2:16 pm

Hi,

From the admin doc, it says one of the characteristics of default automatic projections is that "If created as a result of a CREATE TABLE AS SELECT statement, uses the encoding specified in the query table."

However, in practice, this does not seem to be the case.

Code: Select all

dbadmin=> create table public.test (c1 int encoding rle);
CREATE TABLE
dbadmin=> create table public.test1 as select * from public.test;
CREATE TABLE
dbadmin=> select export_objects('','public.test');
                                         export_objects                                                            
-------------------------------------------------------


CREATE TABLE public.test
(
    c1 int
);



CREATE PROJECTION public.test /*+createtype(P)*/
(
 c1 ENCODING RLE
)
AS
 SELECT test.c1
 FROM public.test
 ORDER BY test.c1
SEGMENTED BY hash(test.c1) ALL NODES KSAFE 1;


SELECT MARK_DESIGN_KSAFE(1);

(1 row)

dbadmin=> select export_objects('','public.test1');
                                         export_objects                                                            
-------------------------------------------------------


CREATE TABLE public.test1
(
    c1 int
);



CREATE PROJECTION public.test1 /*+createtype(A)*/
(
 c1
)
AS
 SELECT test1.c1
 FROM public.test1
 ORDER BY test1.c1
SEGMENTED BY hash(test1.c1) ALL NODES KSAFE 1;


SELECT MARK_DESIGN_KSAFE(1);

(1 row)
The auto-projection for public.test1 does not use RLE encoding as expected for the c1 column.

Am I misunderstanding the doc?
Thanks,
Juliette

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Characteristics of Default Automatic Projections (Encodi

Post by JimKnicely » Thu Nov 06, 2014 8:05 pm

That seems like a bug or an incorrect entry in the docs. What version of Vertica are you running, Julie?
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “Vertica Database Administration”