Skip to main content

How create right partition by varchar column?

  • August 21, 2017
  • 2 replies
  • 10 views

drno-reg
Forum|alt.badge.img+1

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 ?

2 replies

Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • August 22, 2017
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


drno-reg
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • August 22, 2017

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;