Options

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

  • Options
    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

  • Options

    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