What is the "d - determine" constraint type?

Moderator: NorbertKrupa

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

What is the "d - determine" constraint type?

Post by Julie » Thu May 15, 2014 8:46 pm

Hi,

From the docs I see that Vertica 7 supports the constraint types:
  • c — check is reserved, but not supported
    f - foreign
    n - not null
    p - primary
    u - unique
    d - determines
What is the "d - determine" constraint type?
Thanks,
Juliette

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

Re: What is the "d - determine" constraint type?

Post by JimKnicely » Mon May 19, 2014 3:14 am

The "determines" constraints is created when a column correlation is defined. For example:

Code: Select all

dbadmin=> create table test (a int, b int, c int primary key);
CREATE TABLE
dbadmin=> alter table test add constraint t_cor correlation (b) determines (a);
ALTER TABLE
dbadmin=> select constraint_name, table_name, constraint_type from table_constraints where table_name = 'test';
 constraint_name | table_name | constraint_type 
-----------------+------------+-----------------
 C_PRIMARY       | test       | p
 t_cor           | test       | d
(2 rows)
Jim Knicely

Image

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

avoronin
Newbie
Newbie
Posts: 1
Joined: Tue Nov 10, 2015 9:12 am

Re: What is the "d - determine" constraint type?

Post by avoronin » Tue Nov 10, 2015 3:23 pm

Hello All,
Can someone explain what this "correlation detarmines" constraint means ?

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

Re: What is the "d - determine" constraint type?

Post by JimKnicely » Wed Nov 11, 2015 2:44 pm

http://my.vertica.com/docs/7.2.x/HTML/i ... %7C_____34

When creating a design, Database Designer can:
  • Analyze correlated columns.
  • Order the correlated columns in a way that maximizes the compression ratio.
  • Place them early in the projection sort order.
  • Choose Run-Length Encoding (RLE) for the columns that satisfy the recommended RLE criteria.
Jim Knicely

Image

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

Post Reply

Return to “New to Vertica Database Administration”