We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


How create right partition by varchar column? — Vertica Forum

How create right partition by varchar column?

Hello,

I have table

create table WAREHOUSE.EVENT_CUSTOM_ATTRIBUTES
(
event_id VARCHAR(255) not null,
idx VARCHAR(255) not null,
elt long varchar
)

and I want to create partition for this table,

How create right partition by varchar column for example by event_id ?

Comments

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    dbadmin=> create schema WAREHOUSE;
    CREATE SCHEMA
    
    dbadmin=> create table WAREHOUSE.EVENT_CUSTOM_ATTRIBUTES
    dbadmin-> (
    dbadmin(> event_id VARCHAR(255) not null,
    dbadmin(> idx VARCHAR(255) not null,
    dbadmin(> elt long varchar
    dbadmin(> )
    dbadmin-> partition by event_id;
    CREATE TABLE
    

    Here is a link to "Vertica Partitions: The FAQs":

    https://my.vertica.com/kb/HPE-Vertica-Partitions-The-FAQs/Content/FAQs/HPE-Vertica-Partitions-The-FAQs.htm

  • Jim_Knicely, Thank you for the information.

    I've been viewing this link before and not understood how create partition by varchar column with rage for example 700 000 rows, or Vertica will make do everything by herself?

    I will write this script and all?

    create table WAREHOUSE.EVENT_CUSTOM_ATTRIBUTES
    (
    event_id VARCHAR(255) not null,
    idx VARCHAR(255) not null,
    elt long varchar
    )
    partition by event_id;

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file