Lazy Projection

Moderator: NorbertKrupa

Post Reply
clv100
Beginner
Beginner
Posts: 27
Joined: Tue Oct 16, 2012 6:04 pm

Lazy Projection

Post by clv100 » Thu Jan 07, 2016 6:08 pm

Can anyone explain what the term "lazy" projection means? Thanks!

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

Re: Lazy Projection

Post by JimKnicely » Fri Jan 08, 2016 4:04 pm

Hi,

I believe it is just a reference to when Vertcia creates a super-projection for you (because you were too lazy to create you own :roll:)

Example:

Code: Select all

dbadmin=> create table lazy (c int);
CREATE TABLE

dbadmin=> insert into lazy values (1);
 OUTPUT
--------
      1
(1 row)

dbadmin=> select export_objects('','lazy');
                                                                                                                        export_objects                                                             
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


CREATE TABLE public.lazy
(
    c int
);



CREATE PROJECTION public.lazy_super /*+basename(lazy),createtype(L)*/
(
 c
)
AS
 SELECT lazy.c
 FROM public.lazy
 ORDER BY lazy.c
SEGMENTED BY hash(lazy.c) ALL NODES OFFSET 1;


SELECT MARK_DESIGN_KSAFE(1);

(1 row)
Notice that "createtype(L)" syntax. The "L" stands for "Lazy".
Jim Knicely

Image

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

clv100
Beginner
Beginner
Posts: 27
Joined: Tue Oct 16, 2012 6:04 pm

Re: Lazy Projection

Post by clv100 » Fri Jan 08, 2016 8:51 pm

Thank you for the information!

Post Reply

Return to “General”